-
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
Block ChangeFeedMode
interoperability for ChangeFeedProcessor
.
#43798
base: main
Are you sure you want to change the base?
Block ChangeFeedMode
interoperability for ChangeFeedProcessor
.
#43798
Conversation
… and Epk-Range and AllVersionAndDeletes based lease.
API change check API changes are not detected in this pull request. |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
…ockAllVersionsAndDeletesForPkRangeBasedLease
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
ChangeFeedMode
interoperability for ChangeFeedProcessor
.
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
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 PR description being misleading as discussed offline.
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
Description
The goal of this PR is to block a customer leveraging the Change Feed Processor to switch between
LatestVersion
andAllVersionsAndDeletes
change feed mode for the same lease prefix. The context behind this change is whenEPK_RANGE_BASED_LEASE
is left behind byLatestVersion
-AllVersionsAndDeletes
picks up the lease silently (no hang per se) - we don't understand the repercussions here or functional validity. WhenPK_RANGE_BASED_LEASE
is left behind,AllVersionsAndDeletes
doesn't detect it and creates its own lease which is also weird behavior.During the bootstrap of
ChangeFeedProcessor
, the presence of leases with the same lease prefix is checked forPARTITION_KEY_BASED_LEASE
when anAllVersionsAndDeletes
workload is started. If such is the case, then the bootstrap throws anIllegalStateException
as aPARTITION_KEY_BASED_LEASE
is only applicable forLatestVersion
change feed mode. Likewise, if aLatestVersion
workload is started with thehandleChanges
method, the presence ofEPK_RANGE_BASED_LEASE
is checked, which if present, throws anIllegalStateException
. These validations will look for a lease with the same lease prefix as the workload being started.This PR is a follow up to this - #38740 which introduced blocking change feed mode interoperability scoped to
EPK_RANGE_BASED_LEASE
.LatestVersion
and the other withAllVersionsAndDeletes
, theChangeFeedProcessor
will throw anIllegalStateException
during bootstrap.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines