[SERVER-36499] currentOp support for prepared transactions Created: 07/Aug/18  Updated: 29/Oct/23  Resolved: 29/Nov/18

Status: Closed
Project: Core Server
Component/s: Diagnostics, Replication
Affects Version/s: None
Fix Version/s: 4.1.6

Type: Task Priority: Major - P3
Reporter: Judah Schvimer Assignee: Jason Chan
Resolution: Fixed Votes: 0
Labels: prepare_diagnostics
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-37261 CurrentOp shouldn't read OpCtx decora... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-11-19, Repl 2018-12-03
Participants:

 Description   

It looks like the work to track the duration of a transaction in the prepared state is already done. This ticket should confirm that the following JS tests have the appropriate fields and values:

  • currentop_active_transaction.js
  • aggregation_currentop.js
  • currentop_transaction_metrics.js


 Comments   
Comment by Githook User [ 29/Nov/18 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com'}

Message: SERVER-36499 Add test coverage for prepared transaction duration in currOp
Branch: master
https://github.com/mongodb/mongo/commit/ca4912d4026f00049acbc1127f7e3736742c2870

Comment by Tess Avitabile (Inactive) [ 19/Oct/18 ]

jonathan.balsano, this is the ticket where we will add the extra information to currentOp output for transactions in the "prepare" state (i.e. they are going through two-phase commit). A transaction stuck in "prepare" state for a long time (e.g. 10 minutes) indicates that the shard coordinating the two-phase commit has had no primary for a long time, and manual intervention will be required to abort the transaction on all participating shards.

Comment by Judah Schvimer [ 08/Oct/18 ]

This should be tested both on primaries and on secondaries that prepare transactions as part of oplog application.

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