[SERVER-50090] Include the connection ID in the abortExpiredTransactions log entry Created: 04/Aug/20  Updated: 27/Oct/23  Resolved: 12/Jun/23

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Tomer Yakir Assignee: Backlog - Replication Team
Resolution: Gone away Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Participants:

 Description   

When the abortExpiredTransactions operation is logged, it contains the following information:

2020-08-03T09:45:57.170+0000 I  TXN      [abortExpiredTransactions] transaction parameters:{ lsid: { id: UUID("aaaa"), uid: BinData(0, bbbb) }, txnNumber: 1, autocommit: false, readConcern: { level: "snapshot" } }, readTimestamp:Timestamp(0, 0), ninserted:1 keysInserted:1 terminationCause:aborted timeActiveMicros:49 timeInactiveMicros:79530719 numYields:0 locks:{ ReplicationStateTransition: { acquireCount: { w: 3 } }, Global: { acquireCount: { w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { r: 2 } } } storage:{} wasPrepared:0, 79530ms

It'd be helpful to add the connId as a transaction parameter so that we can correlate to a certain connection and get a better sense of which application was associated with this event.



 Comments   
Comment by Connie Chen [ 06/Jun/23 ]

Reassigning this to the Replication team to re-triage as Gaurave is no longer at the company

Comment by A. Jesse Jiryu Davis [ 24/Aug/20 ]

One idea is to log the application name, or application name plus additional client metadata fields like the driver version and OS, along with the aborted transaction ids. We should learn more about what would be useful to diagnose whatever issue motivated this ticket.

Comment by Bruce Lucas (Inactive) [ 07/Aug/20 ]

Aborting expired transactions is done on a separate thread, not by a specific connection. Also I think the concept of "the" connection for a transaction isn't well defined as operations on the transaction could come from multiple connections. However for the use case that prompted this ticket I think it would be sufficient to log the connectionId of the connection that initiated the transaction.

Generated at Thu Feb 08 05:21:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.