Skip to content
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

feat: support RPC priority #676

Merged
merged 7 commits into from Mar 31, 2021
Merged

feat: support RPC priority #676

merged 7 commits into from Mar 31, 2021

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Dec 1, 2020

Adds support for setting RPC priority.

@olavloite olavloite added the do not merge label Dec 1, 2020
@olavloite olavloite requested a review from thiagotnunes Dec 1, 2020
@olavloite olavloite requested review from as code owners Dec 1, 2020
@generated-files-bot
Copy link

@generated-files-bot generated-files-bot bot commented Dec 1, 2020

Warning: This pull request is touching the following templated files:

  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
  • proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto

@google-cla google-cla bot added the cla: yes label Dec 1, 2020
@product-auto-label product-auto-label bot added the api: spanner label Dec 1, 2020
@olavloite
Copy link
Contributor Author

@olavloite olavloite commented Dec 1, 2020

@thiagotnunes The implementation of this feature should be synchronized with #576 (Tagging), as they both set RequestOptions for both individual statements as well as transactions. The most important question regarding this is whether we want to use TransactionOption to pass in the options for a read/write transaction, or whether we want to add a withSomeOption on TransactionContext for the different options.

@codecov
Copy link

@codecov codecov bot commented Dec 1, 2020

Codecov Report

Merging #676 (3abfd4e) into master (a2e5803) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Current head 3abfd4e differs from pull request most recent head 7abb3f8. Consider uploading reports for the commit 7abb3f8 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master     #676      +/-   ##
============================================
+ Coverage     85.10%   85.17%   +0.06%     
- Complexity     2623     2633      +10     
============================================
  Files           155      154       -1     
  Lines         14374    14363      -11     
  Branches       1340     1342       +2     
============================================
  Hits          12233    12233              
+ Misses         1573     1565       -8     
+ Partials        568      565       -3     
Impacted Files Coverage Δ Complexity Δ
.../com/google/cloud/spanner/AbstractReadContext.java 86.82% <100.00%> (+0.28%) 44.00 <2.00> (+2.00)
...rc/main/java/com/google/cloud/spanner/Options.java 92.25% <100.00%> (+4.10%) 85.00 <5.00> (+11.00)
...oogle/cloud/spanner/PartitionedDmlTransaction.java 82.60% <100.00%> (+0.58%) 15.00 <0.00> (+1.00)
...ain/java/com/google/cloud/spanner/SessionImpl.java 86.90% <100.00%> (+0.23%) 31.00 <0.00> (+1.00)
...om/google/cloud/spanner/TransactionRunnerImpl.java 86.24% <100.00%> (+0.17%) 10.00 <0.00> (ø)
...a/com/google/cloud/spanner/SpannerRetryHelper.java 80.95% <0.00%> (-3.67%) 3.00% <0.00%> (ø%)
...m/google/cloud/spanner/connection/SpannerPool.java 87.36% <0.00%> (-0.53%) 33.00% <0.00%> (ø%)
...le/cloud/spanner/connection/ConnectionOptions.java 90.53% <0.00%> (-0.49%) 89.00% <0.00%> (-1.00%)
...ain/java/com/google/cloud/spanner/SessionPool.java 88.93% <0.00%> (ø) 72.00% <0.00%> (+1.00%)
...spanner/admin/database/v1/DatabaseAdminClient.java 87.96% <0.00%> (ø) 72.00% <0.00%> (ø%)
... and 3 more

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 a2e5803...7abb3f8. Read the comment docs.

@@ -406,4 +406,51 @@
<className>com/google/cloud/spanner/AbstractLazyInitializer</className>
<method>java.lang.Object initialize()</method>
</difference>

<!-- RPC Priority -->
<difference>
Copy link
Contributor

@elharo elharo Jan 21, 2021

Choose a reason for hiding this comment

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

This change will break customers and requires a major version bump. This is not optional.

Copy link
Contributor Author

@olavloite olavloite Feb 7, 2021

Choose a reason for hiding this comment

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

This is no longer a breaking change, as the breaking changes that were needed for this and other changes were grouped into a separate change to avoid having to bump the version multiple times. That change added Options... options varargs to the methods that need to support a variety of query / update / transaction options.

@generated-files-bot
Copy link

@generated-files-bot generated-files-bot bot commented Feb 5, 2021

Warning: This pull request is touching the following templated files:

  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/BeginTransactionRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/CommitResponse.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteBatchDmlRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ExecuteSqlRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequest.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ReadRequestOrBuilder.java
  • proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerProto.java
  • proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/spanner.proto

@olavloite olavloite requested a review from elharo Feb 8, 2021
@olavloite olavloite requested review from skuruppu and larkee Mar 23, 2021
@thiagotnunes thiagotnunes self-requested a review Mar 31, 2021
@larkee larkee added kokoro:force-run and removed do not merge labels Mar 31, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Mar 31, 2021
@olavloite
Copy link
Contributor Author

@olavloite olavloite commented Mar 31, 2021

@elharo Would you mind taking another look at this PR? As your review requested changes, this PR is currently blocked from merging.

(FYI: The samples build error is unrelated to this change)

elharo
elharo approved these changes Mar 31, 2021
@larkee larkee merged commit 0bc9972 into master Mar 31, 2021
16 of 17 checks passed
@larkee larkee deleted the rpc-priorities branch Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants