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
refactor: removes double loop of pdml transaction #361
refactor: removes double loop of pdml transaction #361
Conversation
Since this contains a fix for retrying |
Do you mean that this also contains the change from #360? If that's the case, yeah it would be ideal if we decouple the two fixes. |
@skuruppu will remove the fix from here |
Refactors the PDML transaction class to have a single loop for resumes / retries.
@skuruppu the fix is removed from this PR |
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.
LGTM, but I"ll leave it to @skuruppu whether we would want to merge this before the fix for retrying the specific internal errors or not.
@@ -0,0 +1,196 @@ | |||
/* | |||
* Copyright 2019 Google LLC |
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.
nit: 2020
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.
Will fix on the next PR (#360).
This is an auto-generated regeneration of the .pb.go files by cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genmgr will update the corresponding CL at gocloud to depend on the newer version of go-genproto, and assign reviewers. Whilst this or any regen PR is open in go-genproto, gapicgen will not create any more regeneration PRs or CLs. If all regen PRs are closed, gapicgen will create a new set of regeneration PRs and CLs once per night. If you have been assigned to review this CL, please: - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. That will prompt genmgr to assign reviewers to the gocloud CL. Corresponding gocloud CL: https://code-review.googlesource.com/c/gocloud/+/56410
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/8440e2da-528d-412a-bf89-385b5618d6dd/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@1aeca92
Refactors the PDML transaction class to have a single loop for resumes / retries.
I tried to simplify as much as possible on the retry logic we were doing on the transaction.
<rant>
Unfortunately with Java 7 it is hard to improve this logic by not using exceptions for that without having to write lots of code. I could not also come up with a good immutable approach that would have better readability.
</rant>