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

[ChangeFeedProcessor]ExhaustAllRetriesBeforePollDelay #35324

Conversation

xinlian12
Copy link
Member

Fixes issue #34901

Issue:
Expected behavior:

  • Read the change feed.
  • If there are no changes, sleep for a predefined amount of time (customizable with options.setFeedPollDelay in the Builder) and go to step 1
  • If there are changes, send them to the delegate.
  • When the delegate finishes processing the changes successfully, update the lease store with the latest processed point in time and go to step 1

Current behavior:

  • Read the change feed.
  • If there are no changes, sleep for a predefined amount of time (customizable with options.setFeedPollDelay in the Builder) and go to step 1
  • If there are changes, send them to the delegate.
  • When the delegate finishes processing the changes successfully, update the lease store with the latest processed point in time and go to step 1
  • Sleep for predefined amount of time then go to step 1.

Fixes:
Keep fetching left pages until response is 304(Not_Modified), then sleep for pollDelay time

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

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 - one minor suggestion.

sdk/cosmos/azure-cosmos/CHANGELOG.md Outdated Show resolved Hide resolved
@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12 xinlian12 merged commit b4e1799 into Azure:main Jun 8, 2023
64 checks passed
Copy link
Contributor

@milismsft milismsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good; thank you for adding the extensive E2E tests

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.

None yet

4 participants