GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: propogate deadline to session client by mutianf · Pull Request #14547 · googleapis/google-cloud-java

Conversation

@mutianf

@mutianf mutianf commented Sep 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Sources of deadline, in priority order (first match wins in Util.extractDeadline):

  1. gRPC ambient context — set externally via Context.current().withDeadline(...)
  2. Per-call ApiCallContext — retry settings set by the caller on a specific futureCall invocation
  3. Construction-time defaultTimeout — extracted from stub-level retry settings when DivertingUnaryCallable is built; the fallback when neither of the above is present

The bug:

In the session path, the callable returned to the user was missing a withDefaultCallContext carrying the stub-level retry settings. This means the context entering DivertingUnaryCallable was not stamped with those settings.

If someone's grpc context has a longer deadline then the default, and since we missed passing in the default context (2), we never fallback to use 3, and the vrpc runs for longer then expected.

The fix adds .withDefaultCallContext(ctx.withRetrySettings(retrySettings)) after shim decoration, ensuring the stub-level retry settings are always merged into the context before it reaches DivertingUnaryCallable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@mutianf
fix: propogate deadline to session client
23570ea
@mutianf
mutianf requested review from a team as code owners September 29, 2026 20:10
gemini-code-assist[bot]
gemini-code-assist Bot reviewed Sep 29, 2026
View reviewed changes

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

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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 updates EnhancedBigtableStub.java to apply default call contexts with specific retry settings to point read and mutate row callables. A critical compilation error was identified in createPointReadCallable where clientContext is referenced but not defined in the scope; it should instead be accessed via bigtableClientContext.getClientContext().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...loud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

mutianf added 4 commits September 29, 2026 16:18
@mutianf
update
61bbc0e
@mutianf
test(bigtable): verify retry settings propagate as gRPC deadline for …
3020a6e
…point reads and writes

Add three tests to EnhancedBigtableStubTest that verify the
withDefaultCallContext(withRetrySettings(...)) calls added in
createPointReadCallable and createMutateRowCallable actually propagate
the configured total timeout as a gRPC deadline to the server:

- testRetrySettingsPropagatedForPointRead: readRowCallable() path
- testRetrySettingsPropagatedForPointWrite: mutateRowCallable() path
- testRetrySettingsPropagatedForMaybePointRead: readRowsCallable() with
  a single-row query, which MaybePointReadCallable routes to the
  point-read callable
@mutianf
test(bigtable): prove retry settings reach shim wrapper via withDefau…
4b18b61
…ltCallContext

Replace the three retry-propagation tests with shim-capturing variants that
inject a Mockito spy BigtableClientContext returning a test Shim whose wrapper
records the ApiCallContext it receives. This proves that the outer
.withDefaultCallContext(ctx.withRetrySettings(...)) added by the fix actually
populates the context passed to the shim callable – without the fix, the wrapper
would receive null and the assertThat(shimCtx).isNotNull() assertion would fail.
@mutianf
add test
3cecf99
alexoneill
alexoneill approved these changes Sep 30, 2026
View reviewed changes
@mutianf
Merge branch 'main' into timeout
1641b45
sushanb
sushanb approved these changes Sep 30, 2026
View reviewed changes
@mutianf mutianf added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 1, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 1, 2026
@mutianf
mutianf enabled auto-merge (squash) October 1, 2026 13:17
@mutianf
mutianf merged commit 2530951 into googleapis:main Oct 1, 2026
210 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mutianf
mutianf deleted the timeout branch October 1, 2026 13:46
@igorbernstein2 igorbernstein2 mentioned this pull request Nov 10, 2026
fix(bigtable): avoid triggering per-RPC credential session fallback on default call context #14961
Merged
igorbernstein2 added a commit that referenced this pull request Nov 10, 2026
@igorbernstein2
fix(bigtable): avoid triggering per-RPC credential session fallback o…
eb06d2c
…n default call context (#14961)

## Summary
- Remove the outer `.withDefaultCallContext(...)` wrapper around
`DivertingUnaryCallable` in `EnhancedBigtableStub`
(`createPointReadCallable`, `createMutateRowCallable`,
`createCheckAndMutateRowCallable`, `createReadModifyWriteRowCallable`).
Merging `defaultCallContext` before `DivertingUnaryCallable` stamped the
client-level `Credentials` onto every RPC's `CallOptions`, causing
`DivertingUnaryCallable` to treat every authenticated RPC as having a
per-RPC credential override (`per_rpc_credentials_session_fallback`) and
fall back to the classic stack.
- Update `Util.extractDeadline` so `defaultDeadline` is always used as
the fallback for `retryTotalTimeout` even when a longer ambient gRPC
`Context` deadline is present, preserving the deadline behavior from
#14547.
- Update `SessionDeadlineTest` and `DivertingUnaryCallableTest` to cover
client-level credentials and ambient deadlines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alexoneill alexoneill alexoneill approved these changes
@sushanb sushanb sushanb approved these changes
+1 more reviewer
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mutianf @alexoneill @sushanb @yoshi-kokoro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.