From 3bb72042c29ceac96ec628ee643cbc4db8e982ab Mon Sep 17 00:00:00 2001 From: Jason Chan Date: Fri, 30 Nov 2018 16:33:42 -0500 Subject: SERVER-35713 Add oldestOpenReadTimestamp to serverStatus output --- src/mongo/db/server_transactions_metrics.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/server_transactions_metrics.h') 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 _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. -- cgit v1.2.1