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

fix(bigtable): remove unnecessary sleeps from BulkApply #9091

Merged
merged 2 commits into from
May 27, 2022

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented May 27, 2022

Fixes #9089 ... although this should be tested properly.

We now check the loop condition before sleeping instead of after.


This change is Reviewable

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

Google Cloud Build Logs
For commit: db01ace92329046acbea346558a6aa7c9ab84769

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

@@ -171,6 +172,7 @@ std::vector<FailedMutation> Table::BulkApply(BulkMutation mut) {
if (!status.ok() && !retry_policy->OnFailure(status)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

My proposal was:

while (mutator.HasPendingMutations()) { 
....  
  status = mutator.MakeOneRequest(*client_, client_context);
  if (status.ok()) continue;
  if (!retry_policy->OnFailure(status)) break;
...
}

I think your approach saves the initial HasPendingMutations() probably worth it.

@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #9091 (88ec8e4) into main (30c06a2) will not change coverage.
The diff coverage is 94.59%.

@@           Coverage Diff           @@
##             main    #9091   +/-   ##
=======================================
  Coverage   94.44%   94.44%           
=======================================
  Files        1430     1430           
  Lines      127076   127112   +36     
=======================================
+ Hits       120020   120054   +34     
- Misses       7056     7058    +2     
Impacted Files Coverage Δ
google/cloud/bigtable/table_bulk_apply_test.cc 98.55% <94.28%> (-0.87%) ⬇️
google/cloud/bigtable/table.cc 99.25% <100.00%> (+<0.01%) ⬆️
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 97.05% <0.00%> (-2.95%) ⬇️
...le/cloud/internal/default_completion_queue_impl.cc 97.15% <0.00%> (-0.57%) ⬇️
google/cloud/pubsub/samples/samples.cc 91.97% <0.00%> (-0.08%) ⬇️
...le/cloud/storage/internal/curl_download_request.cc 89.59% <0.00%> (+0.33%) ⬆️
...ud/spanner/integration_tests/client_stress_test.cc 86.18% <0.00%> (+0.65%) ⬆️
google/cloud/bigtable/testing/mock_policies.h 61.90% <0.00%> (+4.76%) ⬆️

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 30c06a2...88ec8e4. Read the comment docs.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 88ec8e43a93cf0cf050f145c7e5e5444babef1b2

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

@dbolduc dbolduc marked this pull request as ready for review May 27, 2022 20:37
@dbolduc dbolduc requested a review from a team as a code owner May 27, 2022 20:37
@dbolduc dbolduc enabled auto-merge (squash) May 27, 2022 20:59
@dbolduc dbolduc merged commit 1547c48 into googleapis:main May 27, 2022
@dbolduc dbolduc deleted the bigtable-bulk-apply-sleeps branch May 28, 2022 02:07
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.

bigtable::Table::BulkApply sleeps unnecessarily
4 participants