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: retry if failure occurs on initial call in MutateRows #123

Merged
merged 2 commits into from Sep 21, 2020

Conversation

crwilcox
Copy link
Contributor

@crwilcox crwilcox commented Sep 3, 2020

An issue identified that in certain cases we weren't retrying ServiceUnavailable. According the stack trace, it seems to come from the initial call.

I am currently running a stress test against this change to see if the exception path is activated.

Fixes #115

@crwilcox crwilcox added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 3, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2020
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Sep 4, 2020
@crwilcox crwilcox removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 8, 2020
mutate_rows_request, retry=None
)
try:
responses = data_client._inner_api_calls["mutate_rows"](
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this already handled in read rows or does it need to be added there as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

all methods that changed: googleapis/googleapis@a175708

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Solid call out. this may need to be done broadly to manage the initial setup calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both "read_rows" and "sample_rows" return the raw api call right now. So I think this is complete for now, as we do no special handling beyond gapic configs for these.

responses = data_client._inner_api_calls["mutate_rows"](
mutate_rows_request, retry=None
)
except (ServiceUnavailable, DeadlineExceeded, Aborted):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this PR change the _is_retryable method on this class to us the imported exceptions, too (to DRY that bit out).

Copy link
Contributor

Choose a reason for hiding this comment

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

@tseaver tseaver changed the title fix: Retry if failure occurs on initial call in MutateRows fix: retry if failure occurs on initial call in MutateRows Sep 21, 2020
@crwilcox crwilcox requested a review from a team as a code owner September 21, 2020 21:23
@google-cla
Copy link

google-cla bot commented Sep 21, 2020

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Sep 21, 2020
@tseaver
Copy link
Contributor

tseaver commented Sep 21, 2020

@googlebot I consent.

@google-cla google-cla bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Sep 21, 2020
@crwilcox crwilcox merged commit 0c9cde8 into master Sep 21, 2020
@tseaver tseaver deleted the retry-more-mutate-rows branch September 22, 2021 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UNAVAILABLE (503) error was not retried on MutateRows
3 participants