Skip to content

fix(bigtable): prevent ClientConfigurationManagerTest from wedging on… - #13907

Merged
mutianf merged 1 commit into
googleapis:mainfrom
mutianf:fix-bigtable-config-manager-hang
Jul 27, 2026
Merged

fix(bigtable): prevent ClientConfigurationManagerTest from wedging on…#13907
mutianf merged 1 commit into
googleapis:mainfrom
mutianf:fix-bigtable-config-manager-hang

Conversation

@mutianf

@mutianf mutianf commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

… failed initial fetch

Also harden ClientConfigurationManager.onClose to always terminate the fetch future: if the stream closes cleanly without ever delivering a config, complete it exceptionally instead of leaving the caller blocked on start().get(). For the current unary RPC gRPC already surfaces a missing response as a non-OK status, so this is defensive, but it keeps the Listener->CompletableFuture bridge correct regardless of that invariant.

Fixes #13903

… failed initial fetch

Also harden ClientConfigurationManager.onClose to always terminate the fetch
future: if the stream closes cleanly without ever delivering a config, complete
it exceptionally instead of leaving the caller blocked on start().get(). For the
current unary RPC gRPC already surfaces a missing response as a non-OK status, so
this is defensive, but it keeps the Listener->CompletableFuture bridge correct
regardless of that invariant.
@mutianf
mutianf requested review from a team as code owners July 27, 2026 19:14

@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 defensive handling in ClientConfigurationManager to ensure that the future is always completed, even if the GetClientConfiguration stream closes cleanly without returning a configuration. This prevents the caller from blocking indefinitely on start().get(). Additionally, the unit tests have been updated to include a class-level timeout, inline execution of short-delay retries on the mock executor, and a new test case verifying that the initial fetch successfully retries and recovers from empty responses. I have no feedback to provide.

@mutianf
mutianf enabled auto-merge (squash) July 27, 2026 19:22
@mutianf
mutianf merged commit 725086d into googleapis:main Jul 27, 2026
209 of 211 checks passed
@mutianf
mutianf deleted the fix-bigtable-config-manager-hang branch July 27, 2026 19:53
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.

Bigtable flaky test - ClientConfigurationManagerTest#testDeadlockPrevention

2 participants