Skip to content

chore(bigtable): remove legacy session/channel config migration in ClientConfigurationManager - #14891

Merged
igorbernstein2 merged 1 commit into
mainfrom
remove-legacy-session-config-migration
Nov 2, 2026
Merged

igorbernstein2 merged 1 commit into
mainfrom
remove-legacy-session-config-migration

Conversation

@igorbernstein2

Copy link
Copy Markdown
Contributor

Removes the legacy SessionPoolConfiguration (LoadBalancingOptions) and ChannelPoolConfiguration migration blocks from ClientConfigurationManager.normalizeConfig now that the server populates them directly.

@igorbernstein2
igorbernstein2 requested review from a team as code owners November 2, 2026 17:37

@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 removes legacy configuration migration logic for SessionPoolConfiguration and ChannelPoolConfiguration from ClientConfigurationManager, along with its associated tests. Additionally, in SessionDeadlineTest, the mock getClientConfiguration method is updated to load the default configuration dynamically. Feedback on this change suggests caching the default configuration to avoid inefficient classpath I/O and protobuf parsing on every gRPC request, and wrapping the IOException in a StatusRuntimeException for idiomatic gRPC error propagation.

Comment on lines +257 to +263
ClientConfiguration.Builder builder;
try {
builder = ClientConfigurationManager.loadDefault().toBuilder();
} catch (IOException e) {
responseObserver.onError(e);
return;
}

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.

medium

Loading and parsing the default configuration on every gRPC request in the mock service is inefficient because ClientConfigurationManager.loadDefault() performs classpath resource I/O and protobuf parsing. To optimize this, consider loading the default configuration once and caching it in a private static final field within the class. Additionally, propagating a raw IOException directly to responseObserver.onError is less idiomatic in gRPC; wrapping it in a StatusRuntimeException (e.g., Status.INTERNAL.withCause(e).asException()) is preferred.

@igorbernstein2
igorbernstein2 enabled auto-merge (squash) November 2, 2026 17:43
@igorbernstein2
igorbernstein2 merged commit 03d56de into main Nov 2, 2026
204 of 205 checks passed
@igorbernstein2
igorbernstein2 deleted the remove-legacy-session-config-migration branch November 2, 2026 18:06
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.

2 participants