diff options
author | Nathan Louie <nathan.louie@10gen.com> | 2018-07-03 15:20:23 -0400 |
---|---|---|
committer | Nathan Louie <nathan.louie@10gen.com> | 2018-07-06 11:27:55 -0400 |
commit | 6d9ce16649c73ed1f5d45ed6ca88f61010b73ca9 (patch) | |
tree | bf5c0e0e0ffb4d89e45c0d0b1ed178757e421d2c /src | |
parent | 9a68eb0cc65a93233b4ff5746330f9eb77de9b90 (diff) | |
download | mongo-6d9ce16649c73ed1f5d45ed6ca88f61010b73ca9.tar.gz |
SERVER-35293 Add counts of active and inactive transactions to serverStatus
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/server_transactions_metrics.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/transactions_stats.idl | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/server_transactions_metrics.cpp b/src/mongo/db/server_transactions_metrics.cpp index 6907d94c206..b573996b50b 100644 --- a/src/mongo/db/server_transactions_metrics.cpp +++ b/src/mongo/db/server_transactions_metrics.cpp @@ -112,6 +112,8 @@ void ServerTransactionsMetrics::incrementTotalCommitted() { } void ServerTransactionsMetrics::updateStats(TransactionsStats* stats) { + stats->setCurrentActive(_currentActive.load()); + stats->setCurrentInactive(_currentInactive.load()); stats->setCurrentOpen(_currentOpen.load()); stats->setTotalAborted(_totalAborted.load()); stats->setTotalCommitted(_totalCommitted.load()); diff --git a/src/mongo/db/transactions_stats.idl b/src/mongo/db/transactions_stats.idl index 616e165cd9f..f6f6504d1f0 100644 --- a/src/mongo/db/transactions_stats.idl +++ b/src/mongo/db/transactions_stats.idl @@ -39,6 +39,12 @@ structs: transactionsCollectionWriteCount: type: long default: 0 + currentActive: + type: long + default: 0 + currentInactive: + type: long + default: 0 currentOpen: type: long default: 0 |