[SERVER-42963] For active sessions only set transaction stats in TransactionRouter::Observer::_reportState() Created: 21/Aug/19  Updated: 29/Oct/23  Resolved: 22/Aug/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.1, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Sharding 2019-08-26
Participants:

 Description   

As part of constructing a currentOp entry, TransactionRouter::_reportState adds stats for its current transaction to a BSONObjBuilder. These stats include some that will have already been set for active transactions, like "type", "host", "desc" (set in CurOp::reportCurrentOpForClient(). Instead, when the TransactionRouter's session is active, it should only set the "transaction" field.



 Comments   
Comment by Githook User [ 12/Sep/19 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-41376 Track time transactions on mongos are active and inactive and include in slow txn logging

(cherry picked from commit 4d59f45f85919ddaffa260fb76d1e7dbd8950edf)

SERVER-42907 Add timeActiveMicros and timeInactiveMicros for transactions in mongos currentOp output

(cherry picked from commit 387b570d0ddf0dc87c888d030651357152484191)

SERVER-39573 Prefix TransactionCoordinator logs with transaction id

(cherry picked from commit f92b912452b540fdcbb1b3b959391fb31e64d408)

SERVER-42963 For active sessions only set transaction stats in TransactionRouter::Observer::_reportState()

(cherry picked from commit 4b526b31c6560ec4c632c8062b057d4e346fb1d0)

SERVER-42963 Add uses_atclustertime tag to router_transaction_current_op.js

(cherry picked from commit 936595473bd8423b79e477a442d3093aa11d80c8)

SERVER-41374 Track current open, active, and inactive transactions on mongos in serverStatus

(cherry picked from commit 953e1692d51c6742f1bb1c61dcfece75338afeae)
Branch: v4.2
https://github.com/mongodb/mongo/commit/523d4a46f4cdc9cc928f85eed2c63bc898c8ca63

Comment by Githook User [ 26/Aug/19 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-42963 Add uses_atclustertime tag to router_transaction_current_op.js
Branch: master
https://github.com/mongodb/mongo/commit/936595473bd8423b79e477a442d3093aa11d80c8

Comment by Githook User [ 22/Aug/19 ]

Author:

{'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com', 'name': 'Jack Mulrow'}

Message: SERVER-42963 For active sessions only set transaction stats in TransactionRouter::Observer::_reportState()
Branch: master
https://github.com/mongodb/mongo/commit/4b526b31c6560ec4c632c8062b057d4e346fb1d0

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