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: all setting timeouts for batchers + fix handling of timeouts for point reads #861

Merged
merged 5 commits into from Jun 16, 2021

Conversation

igorbernstein2
Copy link
Contributor

@igorbernstein2 igorbernstein2 commented Jun 4, 2021

This introduces 2 new variants of new*Batcher that accept a GrpcCallContext. This context will be used for batch RPCs generated by the batcher instance.
Also fixes handlings of timeout overrides for point reads and bukmutations. If a user set a timeout, don't override it

…r point reads

This introduces 2 new variants of new*Batcher that accept a GrpcCallContext. This context will be used for batch RPCs generated by the batcher instance.
Also fixes handlings of timeout overrides for point reads and bukmutations. If a user set a timeout, don't override it
@igorbernstein2 igorbernstein2 requested a review from as a code owner Jun 4, 2021
@google-cla google-cla bot added the cla: yes label Jun 4, 2021
@product-auto-label product-auto-label bot added the api: bigtable label Jun 4, 2021
@igorbernstein2 igorbernstein2 requested a review from mutianf Jun 4, 2021
@mutianf
Copy link
Contributor

@mutianf mutianf commented Jun 4, 2021

Hmm, I'm still not sure why this timeout setting can't be set from retry settings when we're creating the callables in EnhancedBigtableStub

For MutateRows batcher, looks like context.withTimeout could be set from attemptSettings#RpcTimeout?
For ReadRows batcher, looks like it'll use total time out if context.withTImeout is not set? https://github.com/googleapis/gax-java/blob/master/gax/src/main/java/com/google/api/gax/rpc/ServerStreamingAttemptCallable.java#L190

*
* List<ApiFuture<Row>> rows = new ArrayList<>();
*
* try (Batcher<ByteString, Row> batcher = bigtableDataClient.newBulkReadRowsBatcher("[TABLE]", filter)) {
Copy link
Contributor

@mutianf mutianf Jun 14, 2021

Choose a reason for hiding this comment

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

Should we include GrpcCallContext in the example here?

@igorbernstein2 igorbernstein2 requested a review from as a code owner Jun 16, 2021
@igorbernstein2
Copy link
Contributor Author

@igorbernstein2 igorbernstein2 commented Jun 16, 2021

I think addressed all of the comments, PTAL

Copy link
Contributor

@mutianf mutianf left a comment

lgtm!

@igorbernstein2
Copy link
Contributor Author

@igorbernstein2 igorbernstein2 commented Jun 16, 2021

Thanks!

@igorbernstein2 igorbernstein2 merged commit c145ceb into googleapis:master Jun 16, 2021
17 checks passed
@igorbernstein2 igorbernstein2 deleted the batcher-ctx branch Jun 16, 2021
igorbernstein2 added a commit that referenced this issue Jun 17, 2021
igorbernstein2 added a commit that referenced this issue Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants