Repository navigation
fix(bigtable): avoid triggering per-RPC credential session fallback on default call context - #14961
Merged
Merged
Conversation
…n default call context
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors deadline extraction logic in Util.java to improve clarity and simplifies EnhancedBigtableStub by removing redundant withDefaultCallContext calls. Additionally, it adds comprehensive test coverage for ambient deadline propagation. My feedback includes a suggestion to add a defensive null check for defaultDeadline in Util.java and a recommendation to use a dedicated ScheduledExecutorService in SessionDeadlineTest.java to prevent potential resource leaks when scheduling context deadlines.
mutianf
approved these changes
Nov 10, 2026
mutianf
reviewed
Nov 10, 2026
mutianf
approved these changes
Nov 10, 2026
mutianf
added a commit
that referenced
this pull request
Nov 11, 2026
…les and verify VirtualRpc traffic (#14963) ### Summary - Make `bigtable-session-it` a composable Maven profile that sets `bigtable.internal.client-config-override-use-default=true` and `bigtable.internal.client-config-override=session_configuration { session_diversion_configuration { global_diversion { session_load: 1.0 } } }` so it can be combined with `bigtable-cfe-it` (`-P bigtable-cfe-it,bigtable-session-it`) or `bigtable-directpath-it` (`-P bigtable-directpath-it,bigtable-session-it`). - Scope `bigtable-cfe-it` failsafe `<includes>` to `com.google.cloud.bigtable.data.v2.it.*IT` (matching `bigtable-directpath-it`), which includes `SessionIT` when `bigtable-session-it` is active (and skips `SessionIT` via `Assume` when `bigtable-session-it` is not active). - Update `.kokoro/presubmit/bigtable-integration-session.cfg` to compose `-P bigtable-cfe-it,bigtable-session-it,enable-verbose-grpc-logs`. - Update `SessionIT`: - Chain `PeerInfoCapturingInterceptor` onto any existing `channelConfigurator` from `CloudEnv` (`REQUIRE_CFE` / `REQUIRE_DIRECT_PATH`) instead of overwriting it. - Assert that `readRow` and `mutateRow` actually send `SessionRequest.virtual_rpc` messages over `OpenTable` and do not fall back to classic `ReadRows`/`MutateRow` RPCs (previously `SessionIT` only checked `bigtable-peer-info` headers from background `OpenTable` stream establishment, allowing silent fallback to classic RPCs to go undetected). - Assert the expected `PeerInfo.TransportType` (`TRANSPORT_TYPE_SESSION_DIRECT_ACCESS` under `REQUIRE_DIRECT_PATH`, `TRANSPORT_TYPE_SESSION_CLOUD_PATH` under `REQUIRE_CFE`). ### Related PRs - Depends on #14961 (expected to fail `SessionIT` on `main` until #14961 is merged). --------- Co-authored-by: Mattie Fu <mattiefu@google.com>
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
.withDefaultCallContext(...)wrapper aroundDivertingUnaryCallableinEnhancedBigtableStub(createPointReadCallable,createMutateRowCallable,createCheckAndMutateRowCallable,createReadModifyWriteRowCallable). MergingdefaultCallContextbeforeDivertingUnaryCallablestamped the client-levelCredentialsonto every RPC'sCallOptions, causingDivertingUnaryCallableto treat every authenticated RPC as having a per-RPC credential override (per_rpc_credentials_session_fallback) and fall back to the classic stack.Util.extractDeadlinesodefaultDeadlineis always used as the fallback forretryTotalTimeouteven when a longer ambient gRPCContextdeadline is present, preserving the deadline behavior from fix: propogate deadline to session client #14547.SessionDeadlineTestandDivertingUnaryCallableTestto cover client-level credentials and ambient deadlines.