Skip to content

Conversation

@olavloite
Copy link
Contributor

@olavloite olavloite commented Aug 4, 2020

PDML statements should be retried on the following errors:

  • ABORTED: Retry using a new transaction
  • INTERNAL(Received unexpected EOS on DATA frame from server):
    Retry using the same transaction and any resume token that was received.

Fixes #1197, #1177

PDML statements should be retried on the following errors:
* ABORTED: Retry using a new transaction
* INTERNAL(Received unexpected EOS on DATA frame from server):
    Retry using the same transaction and any resume token that was received.

Fixes googleapis#1197
@olavloite olavloite requested review from a team as code owners August 4, 2020 20:23
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 4, 2020
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 4, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 4, 2020
@codecov
Copy link

codecov bot commented Aug 4, 2020

Codecov Report

Merging #1205 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1205   +/-   ##
=======================================
  Coverage   98.24%   98.24%           
=======================================
  Files          23       23           
  Lines       21093    21130   +37     
  Branches     1175     1183    +8     
=======================================
+ Hits        20722    20759   +37     
  Misses        368      368           
  Partials        3        3           
Impacted Files Coverage Δ
src/database.ts 99.92% <100.00%> (+<0.01%) ⬆️
src/partial-result-stream.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 445015f...0bcc3ad. Read the comment docs.

Copy link
Contributor

@thiagotnunes thiagotnunes left a comment

Choose a reason for hiding this comment

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

LGTM, but we will need to internally test it to make sure. I will try and do that next week. Thanks!

test/database.ts Outdated
) as sinon.SinonStub).callsFake(callback => callback(null));

runUpdateStub = sandbox.stub(fakePartitionedDml, 'runUpdate');
// runUpdateStub = sandbox.stub(fakePartitionedDml, 'runUpdate');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove commented out line.

@skuruppu skuruppu added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 6, 2020
@skuruppu
Copy link
Contributor

skuruppu commented Aug 6, 2020

Adding a "do not merge" until @thiagotnunes tests the implementation.

@thiagotnunes
Copy link
Contributor

thiagotnunes commented Aug 10, 2020

@olavloite Still getting an error from the backend (a different one though): ERROR: Error: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)

If we change the isRetryable function to something like this it should be enough:

function isRetryableInternalError(err: grpc.ServiceError): boolean {
  return (
    err.code === grpc.status.INTERNAL &&
    (err.message.includes('Received unexpected EOS on DATA frame from server') || err.message.includes('Received RST_STREAM'))
  );
}

@olavloite
Copy link
Contributor Author

@thiagotnunes
Copy link
Contributor

@olavloite thanks for the fix!

I don't know why this is not happening in Java, but you might have a good lead there. By searching internally, it seems that for other clients have decided to also add this error as retryable in any case. I think we should add that in the java client to be on the safe side.

@thiagotnunes thiagotnunes removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 10, 2020
@thiagotnunes thiagotnunes merged commit 2b97bac into googleapis:master Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spanner-client: Retry PDML on "Received unexpected EOS on DATA frame from server"

4 participants