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

[Bug] CFP Skipping Changes #43788

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

tvaron3
Copy link
Member

@tvaron3 tvaron3 commented Jan 15, 2025

Description

Change Feed Processor could skip records if there is throttling on the lease container and some other timing conditions. Change Feed keeps running after receiving a page and attempts to acquire all results. The continuation token gets updated and because it is a shared reference between change feed fetcher and partition processor, some records get skipped without being returned. Additionally, Change Feed Processor is not limiting one request at a time.

Solution

Create a deep copy of the CosmosChangeFeedRequestOptions. Moving the take(1, true) call down to the queryChangeFeed call to correctly only prefetch one page at a time.

Testing

Validated change by using queryChangeFeed with and without take(1,true)

More context: #43701

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 15, 2025

API change check

APIView has identified API level changes in this PR and created following API reviews.

com.azure:azure-cosmos

@tvaron3 tvaron3 changed the title Change feed missing changes CFP Skipping Changes Jan 16, 2025
@tvaron3 tvaron3 changed the title CFP Skipping Changes [Bug] CFP Skipping Changes Jan 16, 2025
@tvaron3
Copy link
Member Author

tvaron3 commented Jan 18, 2025

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3 tvaron3 marked this pull request as ready for review January 20, 2025 07:44
@tvaron3 tvaron3 requested review from kirankumarkolli and a team as code owners January 20, 2025 07:44
@tvaron3
Copy link
Member Author

tvaron3 commented Jan 20, 2025

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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 - left behind some nit comments.

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.

4 participants