Skip to content

CosmosStoredProcedureRequestOptions. setIfMatchETag(eTag) is not working.  #33

@SanjayDasTezpur

Description

@SanjayDasTezpur

if the etag is mismatched, still executes the store proc successfully

`
public void executeStoredProc(Item item) {

CosmosStoredProcedureRequestOptions options = new CosmosStoredProcedureRequestOptions();
options.setIfMatchETag(item.getEtag());
options.setPartitionKey(new PartitionKey(partitionKey));
List<Object> params = Arrays.asList(new ObjectMapper().writeValueAsString(item));
try {
    CosmosStoredProcedureResponse executeResponse = container.getScripts()
            .getStoredProcedure(updateInvstStoredProcId)
            .execute(params, options);
    if (null != executeResponse) {
        return executeResponse.getResponseAsString();
    }
} catch (Exception e) {
    log.error(e);
}

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions