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

Augment Driver class with error handling via RetryInvoker #2552

Closed
wants to merge 20 commits into from

Conversation

panh99
Copy link
Contributor

@panh99 panh99 commented Oct 31, 2023

  • Added a sync lock for Driver API calls in the Driver class to prevent potential thread conflicts
  • Wrapped all Driver API calls within RetryInvoker.
  • Added new unit tests in driver/driver_test.py

The default RetryInvoker for the Driver class is configured as follows.

err_codes = (StatusCode.UNAVAILABLE,)
RetryInvoker(
    exponential,
    RpcError,
    max_tries=10,
    max_time=300,
    should_giveup=lambda e: e.code() not in err_codes,
)

@panh99 panh99 marked this pull request as draft October 31, 2023 20:11
@panh99 panh99 marked this pull request as ready for review November 1, 2023 20:26
@panh99 panh99 requested a review from jafermarq as a code owner January 22, 2024 17:01
@panh99 panh99 closed this Jul 18, 2024
@panh99 panh99 deleted the driver-retry branch July 18, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant