Skip to content

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

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

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

Conversation

@Neenu1995
Copy link
Copy Markdown
Contributor

@Neenu1995 Neenu1995 commented Apr 17, 2026

PR 1 of Per connection logging implementation.

  • Implements BigQueryJdbcMdc using an InheritableThreadLocal design and corresponding unit tests for verification.
  • Use DateTimeFormatter instead of SimpleDateFormat for better performance.

@Neenu1995 Neenu1995 requested review from a team as code owners April 17, 2026 16:44
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 lightweight MDC implementation for the BigQuery JDBC driver to track connection IDs and updates the logging formatter to use modern java.time APIs. The review feedback identifies several critical issues in the new BigQueryJdbcMdc class, including potential memory leaks from static maps holding connection references, thread-safety bugs in the clear() method, and performance inefficiencies caused by redundant InheritableThreadLocal instances. Suggestions were also provided to refine the connection removal logic and ensure side-effect-free mapping functions.

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