Skip to content

feat(bigtable): add preemptive connection recycler#13860

Merged
sushanb merged 6 commits intogoogleapis:mainfrom
sushanb:go_monitor
Feb 19, 2026
Merged

feat(bigtable): add preemptive connection recycler#13860
sushanb merged 6 commits intogoogleapis:mainfrom
sushanb:go_monitor

Conversation

@sushanb
Copy link
Copy Markdown
Contributor

@sushanb sushanb commented Feb 18, 2026

No description provided.

@sushanb sushanb requested review from a team and mutianf February 18, 2026 04:31
@sushanb sushanb requested review from a team as code owners February 18, 2026 04:31
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Feb 18, 2026
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 preemptive connection recycler to manage the lifecycle of connections in the Bigtable client's connection pool, including configuration, background logic, and client integration. However, a security vulnerability was identified: the random number generator used for connection recycling jitter is seeded with a predictable value, which could lead to synchronized connection recycling at scale and impact service availability. It is recommended to use a cryptographically secure random source for seeding. Additionally, there are suggestions to improve code clarity, conventions, and configuration handling, such as addressing a non-idiomatic package name, a silent override of user configuration, and minor typos.

Comment thread bigtable/internal/transport/conn_recycler.go
Comment thread bigtable/client.go
Comment thread bigtable/internal/transport/conn_recycler.go
Comment thread bigtable/internal/transport/conn_recycler.go
Comment thread bigtable/internal/transport/conn_recycler.go
Comment thread bigtable/client.go
EnableDynamicChannelPool bool
// DisableDynamicChannelPool disables the dynamic channel resizing based on load
// Dynamic channel resizing is enabled by default to resize based on load and avoid queuing of requests.
DisableDynamicChannelPool bool
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.

This makes the code a little hard to read. Is it possible to have a constructor function that returns true for these variables by default?

Comment thread bigtable/internal/transport/conn_recycler.go Outdated
Comment thread bigtable/internal/option/option.go Outdated
Comment thread bigtable/internal/transport/conn_recycler.go
@sushanb sushanb merged commit 6b69ee3 into googleapis:main Feb 19, 2026
12 checks passed
bhshkh added a commit that referenced this pull request Mar 16, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:19bb93e8f1f916c61b597db2bad65dc432f79baaabb210499d7d0e4ad1dffe29
<details><summary>bigtable: 1.43.0</summary>

##
[1.43.0](bigtable/v1.42.0...bigtable/v1.43.0)
(2026-03-16)

### Features

* Add support for creating Instance with tags (#13459)
([1bce843](1bce843e))

* support tiered storage (#13793)
([39a25b9](39a25b92))

* add handling of longupdown metrics aka gauge (#13871)
([519ed9b](519ed9b0))

* Use direct access when supported. Guarded by enabling… (#13873)
([5ea1f5f](5ea1f5f9))

* add preemptive connection recycler (#13860)
([6b69ee3](6b69ee38))

* make downscalling less aggressive (#14123)
([7ac72cc](7ac72cc8))

* add pacemaker in connpool (#13862)
([9af047f](9af047f7))

* populate ip protocol for direct access checker and rename a method to
be concise (#14011)
([9c5e655](9c5e6551))

* add connection factory to abstract connection (#13755)
([b08ea15](b08ea15f))

* make pow of 2 default lb policy (#14131)
([b5f7bf2](b5f7bf27))

* derive conn pool from resolver (#14147)
([b903e29](b903e299))

* add load balancing penalty for channel (#14149)
([bb64998](bb649988))

* cap increase in conn for dynamic chan pool (#14144)
([e0701a4](e0701a46))

* switch to rand v2 (#14008)
([ee6f425](ee6f4251))

### Bug Fixes

* slighly change instruction for direct access (#14119)
([7dd4948](7dd4948d))

* refactor bigtable.go into separate file path per interfaces (#13818)
([c8ae2e2](c8ae2e2a))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants