Skip to content

feat(bigtable): append java-bigtable-batcher token to x-goog-api-client for batcher RPCs - #14364

Open
mutianf wants to merge 1 commit into
googleapis:mainfrom
mutianf:per-batcher-api-client-header
Open

feat(bigtable): append java-bigtable-batcher token to x-goog-api-client for batcher RPCs#14364
mutianf wants to merge 1 commit into
googleapis:mainfrom
mutianf:per-batcher-api-client-header

Conversation

@mutianf

@mutianf mutianf commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stamps a java-bigtable-batcher/<version> token into the x-goog-api-client header for all RPCs originating from BulkMutateRows and BulkReadRows batchers.
  • The token is added once to the ApiCallContext stored in BatcherImpl at batcher creation time (via withExtraHeaders), so there is zero per-RPC overhead.
  • Regular (non-batcher) RPCs are unaffected; the extra entry only appears on batcher flush RPCs.
  • Adds three new tests in HeadersTest verifying the token is present on batcher RPCs and absent on regular RPCs.

Test plan

  • bulkMutationBatcherHasBatcherToken — verifies java-bigtable-batcher token appears in x-goog-api-client on BulkMutateRows flush RPCs
  • bulkReadRowsBatcherHasBatcherToken — verifies java-bigtable-batcher token appears in x-goog-api-client on BulkReadRows flush RPCs
  • regularRpcDoesNotHaveBatcherToken — verifies java-bigtable-batcher token is absent on regular MutateRow RPCs
  • Existing HeadersTest tests continue to pass

…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.
@mutianf
mutianf requested review from a team as code owners September 11, 2026 20:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant