feat(bigquery-jdbc): implement non-blocking telemetry batcher and dispatcher#13772
feat(bigquery-jdbc): implement non-blocking telemetry batcher and dispatcher#13772Neenu1995 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
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.
No description provided.