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): Do not retry conditional mutate #11437

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bhshkh
Copy link
Contributor

@bhshkh bhshkh commented Jan 10, 2025

b/387315971

Fixes TestCheckAndMutateRow_NoRetry_TransientError
Before fix:

=== RUN   TestCheckAndMutateRow_NoRetry_TransientError
    checkandmutaterow_test.go:252: 
        	Error Trace:	/usr/local/google/home/bahaaiman/Documents/cfdb-workspace-01/cloud-bigtable-clients-test/tests/checkandmutaterow_test.go:252
        	Error:      	Not equal: 
        	            	expected: 14
        	            	actual  : 0
        	Test:       	TestCheckAndMutateRow_NoRetry_TransientError
    checkandmutaterow_test.go:253: 
        	Error Trace:	/usr/local/google/home/bahaaiman/Documents/cfdb-workspace-01/cloud-bigtable-clients-test/tests/checkandmutaterow_test.go:253
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 2
        	Test:       	TestCheckAndMutateRow_NoRetry_TransientError
--- FAIL: TestCheckAndMutateRow_NoRetry_TransientError 

After fix:

=== RUN   TestCheckAndMutateRow_NoRetry_TransientError
--- PASS: TestCheckAndMutateRow_NoRetry_TransientError (0.01s)

We don't know if the conditional mutation has been applied so we can't retry them.
Updated the retry to match Java's retry settings:

https://github.com/googleapis/java-bigtable/blob/7df848e39ca045a0579c9e359457aa20741d8983/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java#L810-L811

https://github.com/googleapis/java-bigtable/blob/7df848e39ca045a0579c9e359457aa20741d8983/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java#L458-L461

https://github.com/googleapis/java-bigtable/blob/7df848e39ca045a0579c9e359457aa20741d8983/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java#L296-L297

@bhshkh bhshkh requested review from a team as code owners January 10, 2025 21:46
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Jan 10, 2025
@bhshkh bhshkh requested a review from gkevinzheng January 10, 2025 21:59
@bhshkh bhshkh enabled auto-merge (squash) January 10, 2025 22:03
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.

2 participants