[CONJ-897] Include server thread id (a.k.a connection id) in debug log messages Created: 2021-08-24  Updated: 2021-08-31  Resolved: 2021-08-30

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: 2.7.5, 3.0.2-rc

Type: New Feature Priority: Major
Reporter: Jaikiran Pai Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

We have been dealing with various connection related issues between our MariaDB server and MariaDB JDBC driver usage. Most of it comes down to issues that we cannot reproduce locally and are only reproducible in production. Such issues usually require enabling DEBUG logging of MariaDB JDBC driver and then trying to correlate those logs with the server side logs. One such recent case was while investigating https://jira.mariadb.org/browse/CONJ-896. For the most part, the DEBUG logs in the JDBC driver generate good and precise information. However, there are certain log message which are missing the server thread id (the connection id) which makes it very difficult (in a busy production environment) to correlate some of these log messages with the server side logs. Having the connection id be printed in the JDBC driver log messages will go a long way in helping debug issues since this same connection id gets printed in the MariaDB server side logs, thus making it easy to correlate the log and actions that lead to those logs.



 Comments   
Comment by Jaikiran Pai [ 2021-08-24 ]

I've opened a PR https://github.com/mariadb-corporation/mariadb-connector-j/pull/174 with the proposed improvement to certain log messages.

Generated at Thu Feb 08 03:19:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.