Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

fix: retry if failure occurs on initial call in MutateRows - #123

Merged
crwilcox merged 2 commits into
masterfrom
retry-more-mutate-rows
Sep 21, 2020
Merged

fix: retry if failure occurs on initial call in MutateRows#123
crwilcox merged 2 commits into
masterfrom
retry-more-mutate-rows

Conversation

@crwilcox

@crwilcox crwilcox commented Sep 3, 2020

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 September 21, 2020 21:23
@google-cla

google-cla Bot commented Sep 21, 2020

Copy link
Copy Markdown

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

tseaver commented Sep 21, 2020

Copy link
Copy Markdown
Contributor

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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