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]ChangeFeedProcessor on DedicatedGateway #35146

Open
xinlian12 opened this issue May 24, 2023 · 1 comment
Open

[BUG]ChangeFeedProcessor on DedicatedGateway #35146

xinlian12 opened this issue May 24, 2023 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. cosmos:v4-item Indicates this feature will be shipped as part of V4 release train Cosmos cosmos-java-ecosystem-se-planning customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage.

Comments

@xinlian12
Copy link
Member

Issue:
When using ChangeFeedProcessor with Dedicated gateway, LeaseLostException is being constantly observed.

Reason:
For Dedicated gateway, the default MaxIntegratedCacheStaleness is 5 minutes, and for cached query, single item update will not evict the cached query results. During load balancing time, staled/cached lease snapshot will be returned and due to the staled timestamp, leases which are actively being processed may mistakenly categorized as expired leases, and the taking ownership process may fail due to etag mistach.

Proposed solution:
using MaxIntegratedCacheStaleness=0 or BypassIntegratedCache(Azure/azure-cosmos-dotnet-v3#3836)

@xinlian12 xinlian12 added Cosmos cosmos:v4-item Indicates this feature will be shipped as part of V4 release train labels May 24, 2023
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. needs-team-triage Workflow: This issue needs the team to triage. labels May 24, 2023
@FabianMeiswinkel
Copy link
Member

@mkrueger - assigning this one to you. Iain has a similar issue for .Net. We can discuss in our next call.

Bottom-line: DedicatedCache is caching query results - and when nothing changes in a query returns the previously cached results. For Change Feed Processor the lease documents are kept in a Cosmos DB container - the load distribution of the ChangeFeedProcessor instances depends on queries against the lease container - these queries should be configured to side-step the dedicated cache - via setting MaxIntegratedCacheStaleness=0 or BypassIntegratedCache(Azure/azure-cosmos-dotnet-v3#3836)

In java similar issue exists for the ThroughputControl metadata container.

@FabianMeiswinkel FabianMeiswinkel assigned nehrao1 and unassigned mkrueger Sep 16, 2024
@FabianMeiswinkel FabianMeiswinkel added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. cosmos:v4-item Indicates this feature will be shipped as part of V4 release train Cosmos cosmos-java-ecosystem-se-planning customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage.
Projects
None yet
Development

No branches or pull requests

4 participants