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(spanner): support "data boost" on partitioned queries and reads #10998

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

devbww
Copy link
Contributor

@devbww devbww commented Mar 3, 2023

Setting the spanner::PartitionDataBoostOption on a PartitionRead() or PartitionQuery() will result in the respective partitioned Read() and ExecuteQuery() requests being executed via Spanner independent compute resources.


This change is Reviewable

Setting the `spanner::PartitionDataBoostOption` on a `PartitionRead()`
or `PartitionQuery()` will result in the respective partitioned `Read()`
and `ExecuteQuery()` requests being executed via Spanner independent
compute resources.
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Mar 3, 2023
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 94.91% and project coverage change: -0.01 ⚠️

Comparison is base (2970007) 93.65% compared to head (fd47d37) 93.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10998      +/-   ##
==========================================
- Coverage   93.65%   93.65%   -0.01%     
==========================================
  Files        1722     1722              
  Lines      154955   155037      +82     
==========================================
+ Hits       145120   145196      +76     
- Misses       9835     9841       +6     
Impacted Files Coverage Δ
google/cloud/spanner/connection.h 100.00% <ø> (ø)
google/cloud/spanner/samples/samples.cc 62.24% <28.57%> (-0.04%) ⬇️
google/cloud/spanner/query_partition.cc 95.58% <80.00%> (-1.29%) ⬇️
google/cloud/spanner/internal/connection_impl.cc 94.80% <100.00%> (+0.04%) ⬆️
...gle/cloud/spanner/internal/connection_impl_test.cc 97.84% <100.00%> (+0.04%) ⬆️
google/cloud/spanner/partition_options.cc 92.30% <100.00%> (+1.39%) ⬆️
google/cloud/spanner/partition_options.h 100.00% <100.00%> (ø)
google/cloud/spanner/partition_options_test.cc 100.00% <100.00%> (ø)
google/cloud/spanner/query_partition.h 100.00% <100.00%> (ø)
google/cloud/spanner/query_partition_test.cc 100.00% <100.00%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

The `QueryPartition` and `ReadPartition` constructors are private.
The extensions to the `Connection::ReadParams`, `Connection::SqlParams`,
and `PartitionOptions` structs are backwards-compatible.
@devbww devbww marked this pull request as ready for review March 3, 2023 21:29
@devbww devbww requested a review from a team as a code owner March 3, 2023 21:29
@@ -54,11 +54,20 @@ struct PartitionOptions {
* returned may be smaller or larger than this maximum count request.
*/
absl::optional<std::int64_t> max_partitions;

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we planning to deprecate these *Options classes? I don't mean remove, I mean just stop recommending them. If so, we should stop adding features to them. Probably a topic for future discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have kind-of deprecated them in the Client API, in as much as those interfaces are marked as only for backwards compatibility, and we encouraged users to migrate away in a changelog note.

However, they are still used in the Connection API, so they're not really deprecated individually, and we still depend on them being able to carry new data. I don't believe we have any plans to change that.

@devbww devbww merged commit aea166e into googleapis:main Mar 3, 2023
@devbww devbww deleted the data-boost branch March 3, 2023 23:58
devbww added a commit to devbww/google-cloud-cpp that referenced this pull request Mar 16, 2023
Pick up `spanner.v1.{ExecuteSql,Read}Request.data_boost_enabled` tag
fixes, which obviates any need to revert googleapis#10998 before the next release.
devbww added a commit that referenced this pull request Mar 16, 2023
Pick up `spanner.v1.{ExecuteSql,Read}Request.data_boost_enabled` tag
fixes, which obviates any need to revert #10998 before the next release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants