[SERVER-41373] Add abortCause to mongos transactions serverStatus output Created: 29/May/19  Updated: 29/Oct/23  Resolved: 11/Jun/19

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: James Heppenstall (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-40984 Track and log relevant router-wide tr... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Sharding 2019-06-17
Participants:

 Description   

As per the scope document, track the number of each transaction abort cause on mongos and add them to the "transactions" field in its serverStatus output.

This was spun off from SERVER-40984.

Proposed Implementation

  • Add a string map of int64_t to RouterTransactionMetrics protected by a mutex
  • In each place about cause is saved per transaction, add the cause to the map as well
  • Output the map in the format from the scope by updating RouterTransactionMetrics::updateStats() and adding an "abortCause" document type to the RouterTransactionStats IDL type
  • Add unit / jstests
    • Update existing jstests/noPassthrough/router_transaction_metrics.js and/or add new cases to transaction_router_test.cpp


 Comments   
Comment by Githook User [ 24/Jun/19 ]

Author:

{'name': 'Jamie Heppenstall', 'email': 'jamie.heppenstall@mongodb.com', 'username': 'JamesHeppenstall'}

Message: SERVER-41373 Add abortCause to mongos transactions serverStatus output

(cherry picked from commit db2e286c92904fb48fa1414b486782a4e1a654a7)
Branch: v4.2
https://github.com/mongodb/mongo/commit/0a4304ce9927982f55bc76044f1e3c0970014c75

Comment by Githook User [ 11/Jun/19 ]

Author:

{'name': 'Jamie Heppenstall', 'email': 'jamie.heppenstall@mongodb.com', 'username': 'JamesHeppenstall'}

Message: SERVER-41373 Add abortCause to mongos transactions serverStatus output
Branch: master
https://github.com/mongodb/mongo/commit/db2e286c92904fb48fa1414b486782a4e1a654a7

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