Skip to content

Conversation

@igorbernstein2
Copy link
Contributor

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 a team as a code owner June 4, 2021 18:26
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 4, 2021
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Jun 4, 2021
@igorbernstein2 igorbernstein2 requested a review from mutianf June 4, 2021 18:26
@mutianf
Copy link
Contributor

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

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 a team as a code owner June 16, 2021 18:52
@igorbernstein2
Copy link
Contributor Author

I think addressed all of the comments, PTAL

Copy link
Contributor

@mutianf mutianf left a comment

Choose a reason for hiding this comment

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

lgtm!

@igorbernstein2
Copy link
Contributor Author

Thanks!

@igorbernstein2 igorbernstein2 merged commit c145ceb into googleapis:master Jun 16, 2021
@igorbernstein2 igorbernstein2 deleted the batcher-ctx branch June 16, 2021 20:41
igorbernstein2 added a commit that referenced this pull request Jun 17, 2021
igorbernstein2 added a commit that referenced this pull request Jun 17, 2021
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 googleapis/java-bigtable API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants