Skip to content

feat(bqjdbc): Per connection logs - Add BigQueryJdbcMdc#12748

Open
Neenu1995 wants to merge 4 commits intomainfrom
ns/mdc-per-conn-logs
Open

feat(bqjdbc): Per connection logs - Add BigQueryJdbcMdc#12748
Neenu1995 wants to merge 4 commits intomainfrom
ns/mdc-per-conn-logs

Conversation

@Neenu1995
Copy link
Copy Markdown
Contributor

@Neenu1995 Neenu1995 commented Apr 10, 2026

Implements BigQueryJdbcMdc using an InheritableThreadLocal design and corresponding unit tests for verfication.

@Neenu1995 Neenu1995 requested review from a team as code owners April 10, 2026 14:53
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 BigQueryJdbcMdc, a lightweight MDC implementation for the BigQuery JDBC driver using InheritableThreadLocal. Several critical architectural issues were identified: the dynamic creation of InheritableThreadLocal instances per connection is a significant anti-pattern that can lead to memory exhaustion; the static maps hold strong references to BigQueryConnection objects without a removal mechanism, causing memory leaks; and the global getConnectionId method suffers from O(N) complexity and non-deterministic behavior when multiple connections are present on the same thread.

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