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

impl(bigtable): Table accepts Options #9307

Merged
merged 1 commit into from
Jun 19, 2022

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Jun 19, 2022

Part of the work for #7688

I do not think it makes sense to add Options to the constructors that accept a DataClient, because no options will apply to the calls.

The constructor is lacking documentation. I will add it later.


This change is Reviewable

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Jun 19, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: f31dc7ae74bd9695cb827c087a0540700516a073

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Jun 19, 2022

Codecov Report

Merging #9307 (f31dc7a) into main (b39b353) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #9307   +/-   ##
=======================================
  Coverage   94.59%   94.60%           
=======================================
  Files        1470     1470           
  Lines      134565   134621   +56     
=======================================
+ Hits       127294   127354   +60     
+ Misses       7271     7267    -4     
Impacted Files Coverage Δ
google/cloud/bigtable/table.cc 99.36% <100.00%> (+0.05%) ⬆️
google/cloud/bigtable/table.h 99.17% <100.00%> (+0.03%) ⬆️
google/cloud/bigtable/table_test.cc 100.00% <100.00%> (ø)
google/cloud/pubsub/samples/samples.cc 92.18% <0.00%> (+0.07%) ⬆️
...le/cloud/internal/default_completion_queue_impl.cc 97.72% <0.00%> (+0.56%) ⬆️
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 100.00% <0.00%> (+2.94%) ⬆️
google/cloud/bigtable/mocks/mock_data_connection.h 100.00% <0.00%> (+6.66%) ⬆️

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 b39b353...f31dc7a. Read the comment docs.

@dbolduc dbolduc marked this pull request as ready for review June 19, 2022 01:41
@dbolduc dbolduc requested a review from a team as a code owner June 19, 2022 01:41
@devbww
Copy link
Contributor

devbww commented Jun 19, 2022

I cannot find the issue for adding client-level options for the Bigtable Data API

Maybe #7688??

@dbolduc
Copy link
Member Author

dbolduc commented Jun 19, 2022

Maybe #7688??

D'oh. I didn't read past the title, and I assumed the scope was only call options. Not client options + call options. Thanks.

@@ -48,6 +48,7 @@ static_assert(std::is_copy_assignable<bigtable::Table>::value,

Status Table::Apply(SingleRowMutation mut) {
if (connection_) {
google::cloud::internal::OptionsSpan span(options_);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could/should these be outside the if (connection_) conditional?

Copy link
Member Author

@dbolduc dbolduc Jun 19, 2022

Choose a reason for hiding this comment

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

The spans could be outside the if conditionals, but there is no point. The code outside of the if conditionals does not care about CurrentOptions(). I'd rather have the spans inside the if blocks.

Copy link
Contributor

Choose a reason for hiding this comment

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

The code outside of the if conditionals does not care about CurrentOptions().

OK, although I'll assert that it is difficult to know that, and it may be better to be safe than sorry.

@@ -48,6 +48,7 @@ static_assert(std::is_copy_assignable<bigtable::Table>::value,

Status Table::Apply(SingleRowMutation mut) {
if (connection_) {
google::cloud::internal::OptionsSpan span(options_);
Copy link
Contributor

Choose a reason for hiding this comment

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

The code outside of the if conditionals does not care about CurrentOptions().

OK, although I'll assert that it is difficult to know that, and it may be better to be safe than sorry.

@dbolduc dbolduc merged commit 655e7f4 into googleapis:main Jun 19, 2022
@dbolduc dbolduc deleted the bigtable-table-options branch June 19, 2022 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants