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

Availability: Adds non-blocking cache to partition key ranges #3080

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

j82w
Copy link
Contributor

@j82w j82w commented Mar 14, 2022

Pull Request Template

Description

Issues being fixed:

  1. The current implementation is once a refresh occurs all other requests are blocked until the refresh completes. Even if they have 1000 partitions and only 1 is splitting all 999 partitions will be blocked until the refresh completes.
  2. If the refresh fails the old cache value is lost. Then the SDK has to reload the entire which cause additional load to the service on the meta data requests.
  3. Removed cancellation token being passed in. Most scenario it was already set to none. The cancellation should not be passed into cache because multiple other requests are likely to be waiting on that result. If the first request cancels it would negatively impact the rest of the requests. It's better to let the cache finish then let the request fail after.

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 #3060

@j82w j82w merged commit 804feea into master Mar 14, 2022
@j82w j82w deleted the users/jawilley/ha/pkRangeCacheNonBlocking branch March 14, 2022 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PartitionKeyRangeCache should use NonBlockingAsyncCache
3 participants