Skip to content

fix(bigtable): use a sync pool for metrics tracer#14115

Open
sushanb wants to merge 4 commits intogoogleapis:mainfrom
sushanb:memory_a
Open

fix(bigtable): use a sync pool for metrics tracer#14115
sushanb wants to merge 4 commits intogoogleapis:mainfrom
sushanb:memory_a

Conversation

@sushanb
Copy link
Copy Markdown
Contributor

@sushanb sushanb commented Mar 3, 2026

No description provided.

@sushanb sushanb requested review from a team as code owners March 3, 2026 21:41
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Mar 3, 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 effectively introduces a sync.Pool for builtinMetricsTracer objects to reduce memory allocations and improve performance. The implementation correctly uses Get and Put from the pool, and a new reset method properly re-initializes tracers for reuse. The changes are applied consistently across all relevant code paths. I have a couple of minor suggestions to improve comment clarity for better future maintainability.

Comment thread bigtable/client.go Outdated
Comment thread bigtable/metrics.go Outdated
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