-
Notifications
You must be signed in to change notification settings - Fork 1.6k
RPC retries (second PR) #3324
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
RPC retries (second PR) #3324
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
|
CLAs look good, thanks! |
|
@calpeyser The |
garye
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like test coverage is the other thing to fix here as @dhermes points out. Looking good so far!
bigtable/tests/system.py
Outdated
| table = instance.table("table") | ||
|
|
||
| # Run test, line by line | ||
| script = open(TEST_SCRIPT, 'r') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| Sets the row key at which this iterator will begin reading. | ||
| """ | ||
| self.start_key = start_key | ||
| self.start_key_closed = False |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Supersedes #3279. |
|
Hi @dhermes, can you help take a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @calpeyser, thanks for submitting.
I have a few concerns about this as given. The principle of retrying when we know that we can seems fine, but I would ask that you do some cleanup before we accept this.
Thank you very much! :-)
| _MILLIS_PER_SECOND = 1000 | ||
|
|
||
|
|
||
| class ReadRowsIterator(): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if code not in self.retry_options.retry_codes: | ||
| six.reraise(type(error), error) | ||
|
|
||
| # pylint: disable=redefined-variable-type |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| deadline - now) | ||
| self.set_stream() | ||
|
|
||
| six.reraise(errors.RetryError, exc) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| self._validate_chunk(chunk) | ||
|
|
||
| if ("ReadRowsIterator" in |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
|
|
||
| test_platform = platform.system() | ||
| if (test_platform not in MOCK_SERVER_URLS): | ||
| self.fail("Retry server not available for platform " + test_platform) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
| table = instance.table("table") | ||
|
|
||
| # Run test, line by line | ||
| script = open(TEST_SCRIPT, 'r') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/system.py
Outdated
| if line.startswith("CLIENT:"): | ||
| chunks = line.split(" ") | ||
| op = chunks[1] | ||
| if (op != "SCAN"): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| process_scan(table, chunks[2], chunks[3]) | ||
|
|
||
| # Clean up | ||
| server.kill() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if (op != "SCAN"): | ||
| self.fail("Script contained " + op + " operation. Only \'SCAN\' is supported.") | ||
| else: | ||
| process_scan(table, chunks[2], chunks[3]) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
bigtable/tests/unit/test_table.py
Outdated
| return StatusCode.DEADLINE_EXCEEDED | ||
|
|
||
| def _wait_then_raise(): | ||
| time.sleep(0.5) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@lukesneeringer @garye - I've attempted to address the comments above. Thanks for bearing with me! |
|
@calpeyser -- looks like you have some conflicts with the base branch, please resolve them. @lukesneeringer, @garye -- please take a look at the PR, it would be great to merge this functionality soon. Thanks everyone! |
|
LGTM from a bigtable perspective |
|
Conflict resolved, tests are passing. @lukesneeringer, what do you think? |
|
Reading now |
lukesneeringer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me at this point.
|
@lukesneeringer - can you merge it? Neither I nor @garye have write permissions. |
|
🎉 |
|
Thank you @calpeyser for your work on this and thanks to @garye and @lukesneeringer for the reviews! |
|
This caused a system test breakage, I'm very tempted to roll it back and iterate in a PR / branch until the system tests are passing |
This reverts commit 67f4ba4.
This reverts commit 67f4ba4.
This reverts commit 67f4ba4.
This reverts commit 67f4ba4.
Since the repo's layout has changed significantly since the last PR, I've opened a new PR. I've attempted to address the comments from the last go-around - please have a look.