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
- is related to
-
SERVER-40984 Track and log relevant router-wide transaction metrics on mongos for serverStatus
- Closed