diff options
author | Lamont Nelson <lamont.nelson@mongodb.com> | 2019-09-05 18:32:19 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-05 18:32:19 +0000 |
commit | b46eb782c4730c8df589a56550c29c3f3585904a (patch) | |
tree | 908a3dffce58c449a9d241f193c99e1e6ec28bee /src/mongo/db/s/transaction_coordinator_catalog.h | |
parent | 174736c49e4a284d12c2d31a3f9c8bf341a35c65 (diff) | |
download | mongo-b46eb782c4730c8df589a56550c29c3f3585904a.tar.gz |
SERVER-42809 report metrics for the transaction coordinators in curop command
Diffstat (limited to 'src/mongo/db/s/transaction_coordinator_catalog.h')
-rw-r--r-- | src/mongo/db/s/transaction_coordinator_catalog.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/s/transaction_coordinator_catalog.h b/src/mongo/db/s/transaction_coordinator_catalog.h index 0ae1c59e00b..5768c69bb3c 100644 --- a/src/mongo/db/s/transaction_coordinator_catalog.h +++ b/src/mongo/db/s/transaction_coordinator_catalog.h @@ -104,6 +104,17 @@ public: */ std::string toString() const; + using FilterPredicate = + std::function<bool(const LogicalSessionId lsid, + const TxnNumber txnNumber, + const std::shared_ptr<TransactionCoordinator> transactionCoordinator)>; + using FilterVisitor = + std::function<void(const LogicalSessionId lsid, + const TxnNumber txnNumber, + const std::shared_ptr<TransactionCoordinator> transactionCoordinator)>; + + void filter(FilterPredicate predicate, FilterVisitor visitor); + private: // Map of transaction coordinators, ordered in decreasing transaction number with the most // recent transaction at the front |