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

fixChangingFeedModeCheckingForPkRangeVersion #40420

Merged

Conversation

xinlian12
Copy link
Member

Issue:
When customer uses handleChanges (PkRange based lease), if lease store has been initialized, then starting the change feed processor will fail with the following exception:

java.lang.IllegalArgumentException: Illegal base64 character 22

Root cause:
There has been a recent change to validate the change feed mode in the lease during changeFeed startup. When trying to validate the changeFeedMode in the lease, we are using ChangeFeedState.fromString() to parse the continuationToken, this method excepts the continuationToken to be in base64 format. However, for pkRange based lease, the continuationToken is only a long, that is when the above exception will be thrown.

Fix:
Remove the change feed mode checking if customer is on pkRange based lease, as only Incremental change feed mode is supported in the pkRange based lease.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kushagraThapar kushagraThapar 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 @xinlian12

Copy link
Member

@jeet1995 jeet1995 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!

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

@xinlian12
Copy link
Member Author

Tested readAllItemsWithDetailMetricsWithExplicitPageSize locally

@xinlian12
Copy link
Member Author

/check-enforcer override

@xinlian12 xinlian12 merged commit dccabdd into Azure:main May 31, 2024
75 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants