[SERVER-31261] Improve diagnosibility of long running transactions in OperationContext Created: 26/Sep/17  Updated: 06/Dec/22  Resolved: 25/May/18

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

Type: Improvement Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 0
Labels: SWDI
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-21367 Log long-running WT transactions in t... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

One idea: (Debug mode only) Start a timer when a txn starts; when txn ends, if the timer expires, log a message.



 Comments   
Comment by Geert Bosch [ 30/Mar/18 ]

SERVER-21367 already implements this idea. If the log level for the storage component is at least 1, a message with severity D (Debug) will be logged when the WiredTiger transaction takes longer than slowMS millis, we will log a message like:

2016-12-02T16:07:44.386-0500 D STORAGE  [initandlisten] Slow WT transaction.
Lifetime of SnapshotId 4 was 2ms

Given that, it seems this is a duplicate.

Comment by Ian Whalen (Inactive) [ 16/Mar/18 ]

geert.bosch can you please speak to bruce.lucas to confirm where this should go before we bounce it to another team?

Comment by Ian Whalen (Inactive) [ 16/Mar/18 ]

Sorry for the hot potato but bouncing to Repl since this is a request for the not-yet-released transactions work.

Comment by Bruce Lucas (Inactive) [ 26/Sep/17 ]

Maybe the max transaction time for an operation could be recorded logged as part of slow query logging?

For very long transactions that may not complete, e.g. because they are hung or because they cause a hang by getting the cache stuck full, possibly a message could be logged say every 10 seconds that a transaction is open. Normally you wouldn't want to log anything while holding a transaction, but if the transaction has been going 10 seconds logging a message may not make it particularly worse.

The above would be for normal operation, not just debug mode, to help diagnose these issues in the field.

Generated at Thu Feb 08 04:26:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.