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

Bulk: Fixes incorrect routing on split #2069

Merged
merged 8 commits into from Dec 16, 2020
Merged

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Dec 16, 2020

Pull Request Template

Description

This PR fixes two issues with Bulk mode:

  1. The Retry policy that was in place only retried once if a split occurred, in the case of a collection splitting many times, requests could fail leaking a 410 status code.
  2. When the split occurred, the requests was still retried on the original partition because the ItemOperationContext was not updating the PartitionKeyRangeId that it should route to and the collectionmap was not refreshing correctly. The effect is that the user received a failure with a status code 410 and substatus code 1002.

The PR also updates the unit tests to add verification that the collection maps are being correctly refreshed on the expected cases upon retries.

Type of change

Please delete options that are not relevant.

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

j82w
j82w previously approved these changes Dec 16, 2020
@ealsur ealsur merged commit 260324d into master Dec 16, 2020
@ealsur ealsur deleted the users/ealsur/bulkretry503 branch December 16, 2020 17:15
ealsur added a commit that referenced this pull request Dec 17, 2020
* increasing retry

* Correctly routing after split

* Adding tests

* More tests

* using cosmosexception

Co-authored-by: j82w <j82w@users.noreply.github.com>
j82w pushed a commit that referenced this pull request Dec 17, 2020
Cherry-picking commits for the release

#2069
#2047
#2071
#2042
Version bump from #2072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Bulk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants