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

Session: Fixes token being sent if request had a different consistency level on Gateway mode #2965

Merged
merged 7 commits into from
Jan 5, 2022

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Jan 3, 2022

Description

On Gateway mode, if the account is Session consistency but the user is sending a request where the ItemRequestOptions has a ConsistencyLevel != Session, we were sending the session token anyway.

This PR makes it so the request level configuration is honored over the account level configuration only on read requests.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

@ealsur ealsur added the bug Something isn't working label Jan 3, 2022
@ealsur ealsur self-assigned this Jan 3, 2022
@ealsur ealsur changed the title Session: Fixes session token being sent if request had a different consistency level Session: Fixes token being sent if request had a different consistency level on Gateway mode Jan 3, 2022
kirankumarkolli
kirankumarkolli previously approved these changes Jan 4, 2022
Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

The "requestHasConsistencySet" needs to check whether it is read-only operation (or that condition needs to be added to sessionConsistency calculation

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel 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!

@ealsur ealsur enabled auto-merge (squash) January 5, 2022 22:43
@ealsur ealsur merged commit 9a7ea38 into master Jan 5, 2022
@ealsur ealsur deleted the users/ealsur/gatewayrequestst branch January 5, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants