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

Gateway: Fixes gateway mode ApplySessionToken bug causes cache to always refresh #2408

Merged
merged 15 commits into from
Apr 22, 2021

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Apr 21, 2021

Pull Request Template

Description

The ApplySessionToken logic was using the partitionKeyRangeId.ToString() instead of the correct partitionKeyRangeId.PartitionKeyRangeId. This was causing the cache to always miss and force a refresh on every call.

Testing:

  • Added a new http handler which validates that partition key range cache only does a network call on the initial load.
  • Added unit tests validating the partition key range scenario

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #IssueNumber

@j82w j82w added the bug Something isn't working label Apr 21, 2021
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 previously approved these changes Apr 21, 2021
…ge validation is opt-in instead of default on.
@j82w j82w dismissed stale reviews from ealsur and kirankumarkolli via 9d7fad1 April 21, 2021 17:54
@j82w j82w changed the title Gateway: Fixes gateway mode apply session token logic to prevent refreshing cache on every call Gateway: Fixes gateway mode force partition key range cache refreshes on every call Apr 21, 2021
@j82w j82w changed the title Gateway: Fixes gateway mode force partition key range cache refreshes on every call Gateway: Fixes gateway mode ApplySessionToken bug causes cache to always refresh Apr 21, 2021
@j82w j82w merged commit b9bb04a into master Apr 22, 2021
@j82w j82w deleted the users/jawilley/bug/pkRangeRefresh branch April 22, 2021 19:16
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.

4 participants