Skip to content

feat(bigquery-jdbc): implement non-blocking telemetry batcher and dispatcher#13772

Open
Neenu1995 wants to merge 4 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr7
Open

feat(bigquery-jdbc): implement non-blocking telemetry batcher and dispatcher#13772
Neenu1995 wants to merge 4 commits into
jdbc-telemetry-featurefrom
jdbc-telemetry-pr7

Conversation

@Neenu1995

Copy link
Copy Markdown
Contributor

No description provided.

@Neenu1995 Neenu1995 requested review from a team as code owners July 14, 2026 20:55

@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 TelemetryBatcher, a class designed to buffer and periodically flush telemetry events, and increases the default batch size threshold to 5000. The review feedback highlights critical performance bottlenecks in the implementation. Specifically, it recommends replacing ConcurrentLinkedQueue with LinkedBlockingQueue to avoid O(N) size() operations, refactoring helper methods to use the generic Queue interface, and optimizing the payload trimming loop in flush() to remove items in bulk rather than one-by-one to prevent expensive, repetitive protobuf serialization size checks. Additionally, using explicit locks instead of synchronized blocks is recommended for performance-sensitive code.

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