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

fix: remove custom retry loop #948

Merged
merged 4 commits into from
Aug 14, 2024
Merged

fix: remove custom retry loop #948

merged 4 commits into from
Aug 14, 2024

Conversation

daniel-sanche
Copy link
Contributor

Removing the hand-written _commit_with_retry logic, in favor of built-in gapic retry implementation

According to the docstrings, this custom retry logic was put in place because the gapic layer originally didn't retry ServiceUnavalable errors by default, but that has changed over time.

Now this retry logic is just stacking an extra retry loop on top of the built-in one. Additionally, the custom retry loop doesn't have an exit condition, making it susceptible to infinite loops

At this point, it is safer to remove this custom logic, and rely on only the built-in gapic retry behavior

More detailed refactors of retries coming later, but this is a step in that direction

Fixes #850

@daniel-sanche daniel-sanche requested review from a team as code owners August 12, 2024 23:36
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: firestore Issues related to the googleapis/python-firestore API. labels Aug 12, 2024
@gkevinzheng gkevinzheng merged commit 04bb206 into main Aug 14, 2024
21 of 22 checks passed
@gkevinzheng gkevinzheng deleted the fix_850 branch August 14, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/python-firestore API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When ServiceUnavailable is thrown, transaction silently loop forever
2 participants