-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
gRPC _Rendezvous w/ 'ABORTED' status propagated from 'Session.run_in_transaction' #3562
Comments
The code for |
@lukesneeringer Do we need to be regenerating the GAPIC code? |
Hi this is very annoying, to have a whole bunch of exceptions thrown in my application whenever a transaction is aborted. Is there any workaround to this issue at the moment? |
@vladkluev I'm hopeful we will have a fix pushed out shortly (this bug blocks PR #3663). |
So, the issue is that the |
@tseaver I'm discussing this with @lukesneeringer offline. |
Repeating this back to ensure I understand: Basically this is a situation where one call wraps the errors while others do not? Is this a configuration difference? Something else? |
@lukesneeringer the new system test in #3663 provokes it routinely: the gRPC |
Okay, so it is literally non-deterministic then? |
It fails repeatably on #3663. My suspicion is that the GAX/GAPIC streaming support is involved (our |
It is non-deterministic. On our production systems it happens maybe 1/15 times. I temporarily patched it by catching the error and doing retries. My question is, what is the behavior that is supposed to happen here? If the transaction is non-deterministically aborted due to a "transient" error, is the user of the API the one who is supposed to deal with that? |
@vladkluev The |
Ah gotcha |
It looks like the streaming gRPC methods return a |
Thanks for the analysis, @eoogbe. @nathanielmanistaatgoogle might be able to help you with understanding the gRPC code, or can point you to someone who can. |
@eoogbe: the response-streaming methods return an object that is both a Under the hood, as you've discovered, it's just one object (a Does your code look something like my_response_iterator_call = my_stub.MyResponseStreamingRpcMethod(
my_request_or_request_iterator)
try:
for my_response in my_response_iterator_call:
do_thing(my_response)
except grpc.RpcError as my_rpc_error_call:
logging.exception(
'RPC terminated abnormally with code %s and details %s!',
my_rpc_error_call.code(), my_rpc_error_call.details())
else:
logging.info('RPC completed successfully!') ? Should it look something like that? |
The code that wraps the |
@eoogbe: it's also not safe to assume that the only problems that can ever happen during an RPC happen during RPC invocation. It's perfectly possible, for example, for a response-streaming RPC to stream one hundred responses and then time out so that the client sees an exception raised from the one-hundred-and-first call to As I assess it |
#3738 will give us the fundamental building blocks to map exceptions correctly, but @nathanielmanistaatgoogle is right, we need to take special care with unary-streaming methods. I'll address that in the PR that adds gRPC-specific helpers to |
@jonparrott Is there anything that @eoogbe needs to do in https://github.com/googleapis/gax-python to fix this issue, or does #3738 provide everything we need to fix this issue? |
|
To further clarify: #3738 is sufficient to solve this specific case because
spanner has significant manual code above the gapic, so the mapping can be
done there. google.api.core will provide a iterator wrapper for
unary-streaming that can be used by gapic.
…On Mon, Aug 7, 2017, 7:07 PM Luke Sneeringer ***@***.***> wrote:
- #3738
<#3738>
is necessary but not sufficient.
- GAX does not use #3738
<#3738>;
@jonparrott <https://github.com/jonparrott> will need to port that
segment to google.api.core.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3562 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPUcxWbxhkKTuZQyhEuSHg4ZIlG08bQks5sV8LIgaJpZM4OIYWe>
.
|
Fixing this issue that's blocking Python Spanner Beta has the greatest urgency, so it's good to hear that #3738 is sufficient to fix it. That said, we'll need to fix this for GAPIC-only libraries. @jonparrott can you show @eoogbe what needs to be done to port your work to GAX, so that she's also familiar with the fix? |
Following up internally. |
Thanks for the update @jonparrott. I've responded internally. What needs to be done to close this specific issue for Spanner? Will you do it or should @tseaver? |
Thanks, Jon. |
I will be merging the workaround in #3663 for spanner tonight. |
Thanks @tseaver! |
Via #3663. |
https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/2281
@tseaver Can you triage / update the issue title to be more specific?
The text was updated successfully, but these errors were encountered: