feat(bigtable): append java-bigtable-batcher token to x-goog-api-client for batcher RPCs - #14364
Open
mutianf wants to merge 1 commit into
Open
feat(bigtable): append java-bigtable-batcher token to x-goog-api-client for batcher RPCs#14364mutianf wants to merge 1 commit into
mutianf wants to merge 1 commit into
Conversation
…nt for batcher RPCs Stamp the batcher call context with a `java-bigtable-batcher/<version>` token at batcher creation time so BulkMutateRows and BulkReadRows batcher RPCs are distinguishable from single-operation RPCs in backend telemetry. The token is added once to the `ApiCallContext` stored in `BatcherImpl` rather than on each flush, so there is no per-RPC overhead.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a batcher-specific API client token (java-bigtable-batcher/<version>) to the x-goog-api-client header for bulk mutation and bulk read rows batchers in EnhancedBigtableStub. It also adds corresponding unit tests in HeadersTest to verify that this token is correctly included in batcher RPC headers and excluded from regular RPCs. There are no review comments, so I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
java-bigtable-batcher/<version>token into thex-goog-api-clientheader for all RPCs originating fromBulkMutateRowsandBulkReadRowsbatchers.ApiCallContextstored inBatcherImplat batcher creation time (viawithExtraHeaders), so there is zero per-RPC overhead.HeadersTestverifying the token is present on batcher RPCs and absent on regular RPCs.Test plan
bulkMutationBatcherHasBatcherToken— verifiesjava-bigtable-batchertoken appears inx-goog-api-clienton BulkMutateRows flush RPCsbulkReadRowsBatcherHasBatcherToken— verifiesjava-bigtable-batchertoken appears inx-goog-api-clienton BulkReadRows flush RPCsregularRpcDoesNotHaveBatcherToken— verifiesjava-bigtable-batchertoken is absent on regular MutateRow RPCsHeadersTesttests continue to pass