Skip to content

fix(bigtable): recycle channel on consecutive new stream failures#13245

Open
nimf wants to merge 1 commit into
mainfrom
consecutive_failures
Open

fix(bigtable): recycle channel on consecutive new stream failures#13245
nimf wants to merge 1 commit into
mainfrom
consecutive_failures

Conversation

@nimf
Copy link
Copy Markdown
Contributor

@nimf nimf commented May 20, 2026

No description provided.

@nimf nimf requested review from a team as code owners May 20, 2026 22:49
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 introduces a mechanism to recycle gRPC channels in the ChannelPoolDpImpl after a threshold of five consecutive session failures. It also implements an exponential backoff for channel recycling to prevent aggressive recreation during outages. Feedback suggests capping the exponential backoff duration to ensure timely recovery and using the subtraction idiom for System.nanoTime() comparisons to correctly handle potential numerical wrap-around.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 introduces a mechanism to recycle gRPC channels in the Bigtable client after a threshold of consecutive session failures is reached. It includes an exponential backoff strategy for recycling to prevent rapid churn and adds comprehensive unit tests to verify the failure counting and reset logic. Feedback focuses on improving the robustness of the backoff implementation by using the subtraction idiom for System.nanoTime() comparisons and enforcing a maximum bound for the backoff duration to prevent overflow. Suggestions were also made to use constants for backoff durations to improve maintainability.

@nimf nimf force-pushed the consecutive_failures branch from 50d50df to 643a4bb Compare May 20, 2026 23:18
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