Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache bypass in dedicated gateway request options #35865

Merged
merged 9 commits into from
Aug 18, 2023

Conversation

balalakshmin
Copy link
Member

Description

This is to add a new DedicatedGatewayRequestOption "BypassIntegratedCache".
For customers to have more control over integrated cache, we're introducing a new "RequestOption" called "BypassIntegratedCache". This option will allow the customer to decide whether to use integrated cache for each request or not. If this value is set to true, the item/query will be served from backend and won't be cached in Dedicated Gateway.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-cosmos

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be use primitive boolean?
Also, blocking on testing of this PR, once tested, then we can go ahead with the merge.

@balalakshmin
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Pull request contains merge conflicts.

requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID));
ResourceResponse<Document> response = client.readDocument(documentLink, requestOptions).block();
if (cacheBypass) {
String responseHeader = response.getResponseHeaders().get("x-ms-cosmos-cache-bypass");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synced up offline with @balalakshmin. x-ms-cosmos-cache-bypass response from the service / gateway denotes whether the request hit the cache or not.

Copy link
Member

@jeet1995 jeet1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for the change.

@jeet1995
Copy link
Member

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@balalakshmin
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kushagraThapar
Copy link
Member

/check-enforcer override

@kushagraThapar kushagraThapar merged commit 3ecd91f into main Aug 18, 2023
58 of 61 checks passed
@kushagraThapar kushagraThapar deleted the users/balalakshmin/cachebypass branch August 18, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants