summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_transactions_metrics.h
diff options
context:
space:
mode:
authorJason Chan <jason.chan@mongodb.com>2018-11-30 16:33:42 -0500
committerJason Chan <jason.chan@mongodb.com>2018-11-30 16:42:39 -0500
commit3bb72042c29ceac96ec628ee643cbc4db8e982ab (patch)
treea4c2b430c4b39771b83797df1d8132cb38a1b811 /src/mongo/db/server_transactions_metrics.h
parent401151f1d29e7d88f4abf10c7ca92739dbc55336 (diff)
downloadmongo-3bb72042c29ceac96ec628ee643cbc4db8e982ab.tar.gz
SERVER-35713 Add oldestOpenReadTimestamp to serverStatus output
Diffstat (limited to 'src/mongo/db/server_transactions_metrics.h')
-rw-r--r--src/mongo/db/server_transactions_metrics.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/server_transactions_metrics.h b/src/mongo/db/server_transactions_metrics.h
index c29dd2b12f2..5bbcb661e8f 100644
--- a/src/mongo/db/server_transactions_metrics.h
+++ b/src/mongo/db/server_transactions_metrics.h
@@ -141,7 +141,7 @@ public:
/**
* Appends the accumulated stats to a transactions stats object.
*/
- void updateStats(TransactionsStats* stats);
+ void updateStats(TransactionsStats* stats, OperationContext* opCtx);
private:
/**
@@ -150,6 +150,13 @@ private:
*/
boost::optional<repl::OpTime> _calculateOldestActiveOpTime(WithLock) const;
+ /**
+ * Returns the oldest read timestamp in use by any open unprepared transaction. This will
+ * return a null timestamp if there is no oldest open unprepared read timestamp to be
+ * returned.
+ */
+ static Timestamp _getOldestOpenUnpreparedReadTimestamp(OperationContext* opCtx);
+
//
// Member variables, excluding atomic variables, are labeled with the following code to
// indicate the synchronization rules for accessing them.