-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CosmosDB: fix a regression in ChangeFeedProcessor when handling split events #22718
Conversation
…rom zero for the new partitions. This is a regression introduced in SDK version 4.12 as part of the change feed pull model related changes. The fix is to directly set the "parent" lease continuation token into the new leases that get created as result of a split.
...ava/com/azure/cosmos/implementation/changefeed/implementation/PartitionSynchronizerImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unblocking the PR, but still believe some test needs to be added to verify this scenario and prevent future regressions.
Unblocking the PR, but still believe some test needs to be added to verify this scenario and prevent future regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for the comment @j82w Jake added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
…e NPE exceptions could be triggered.
/azp run java - cosmos - test |
No pipelines are associated with this pull request. |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
When partition splitting occurs, we wrongly resume the change feeds from zero for the new partitions.
This is a regression introduced in SDK version 4.12 as part of the change feed pull model related changes.
The fix is to directly set the "parent" lease continuation token into the new leases that get created as result of a split.