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

datastore: fix to backoff global / race condition now no longer exponentially backs off #11049

Closed
sgp opened this issue Oct 29, 2024 · 2 comments · Fixed by #11050
Closed

datastore: fix to backoff global / race condition now no longer exponentially backs off #11049

sgp opened this issue Oct 29, 2024 · 2 comments · Fixed by #11050
Assignees
Labels
api: datastore Issues related to the Datastore API. triage me I really want to be triaged.

Comments

@sgp
Copy link
Contributor

sgp commented Oct 29, 2024

Client

Cloud Datastore

Environment

All Environments

Expected behavior

All transaction-related retries, including creating and rolling back, should utilize exponential backoff.

Actual behavior

A local gax.OnCode call is made inside each try, which ensures that the pause between tries will always be the minimum 20ms specified by txnBackoff (+/- the random jitter), regardless of whether it's the first, second, or nth retry.

Additional context

This was introduced in #10489 (1.1.18) which fixed a bigger bug introduced in #10349 (1.17.1) that actually bit us in production. In Datastore 1.17.1, the retryers were global, and thus eventually, if you had enough retries between transactions, the first retry would eventually be the maximum time. For this reason, I recommend that Google consider retracting version 1.17.1 of the Cloud Datastore Client entirely.

@sgp sgp added the triage me I really want to be triaged. label Oct 29, 2024
@product-auto-label product-auto-label bot added the api: datastore Issues related to the Datastore API. label Oct 29, 2024
@sgp
Copy link
Contributor Author

sgp commented Oct 29, 2024

Is it too late to get this in the 1.20.0 component release for datastore?

@bhshkh
Copy link
Contributor

bhshkh commented Oct 29, 2024

Will include in 1.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. triage me I really want to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants