summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_transactions_metrics.h
diff options
context:
space:
mode:
authorSamy Lanka <samy.lanka@mongodb.com>2019-04-03 17:35:29 -0400
committerSamy Lanka <samy.lanka@mongodb.com>2019-04-03 17:36:14 -0400
commit4459b439700f096a7b6287fdddde592db8934fe2 (patch)
tree9913de37d8eb6d7f9798da1dba7c3dcffb5dbb94 /src/mongo/db/server_transactions_metrics.h
parentc7476a53ab4e33914217b61c8e81f29b8df09322 (diff)
downloadmongo-4459b439700f096a7b6287fdddde592db8934fe2.tar.gz
SERVER-40018 Remove ServerTransactionMetrics::getOldestActiveOpTime and supporting datastructures
Diffstat (limited to 'src/mongo/db/server_transactions_metrics.h')
-rw-r--r--src/mongo/db/server_transactions_metrics.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/mongo/db/server_transactions_metrics.h b/src/mongo/db/server_transactions_metrics.h
index 706200409da..d5b829f6845 100644
--- a/src/mongo/db/server_transactions_metrics.h
+++ b/src/mongo/db/server_transactions_metrics.h
@@ -88,39 +88,10 @@ public:
void decrementCurrentPrepared();
/**
- * Returns the OpTime of the oldest oplog entry written across all open transactions.
- * Returns boost::none if there are no transaction oplog entry OpTimes stored.
- */
- boost::optional<repl::OpTime> getOldestActiveOpTime() const;
-
- /**
- * Add the transaction's oplog entry OpTime to a set of OpTimes.
- */
- void addActiveOpTime(repl::OpTime oldestOplogEntryOpTime);
-
- /**
- * Remove the corresponding transaction oplog entry OpTime if the transaction commits or
- * aborts.
- */
- void removeActiveOpTime(repl::OpTime oldestOplogEntryOpTime);
-
- /**
- * Returns the number of transaction oplog entry OpTimes currently stored.
- */
- unsigned int getTotalActiveOpTimes() const;
-
- /**
* Appends the accumulated stats to a transactions stats object.
*/
void updateStats(TransactionsStats* stats, OperationContext* opCtx);
- /**
- * Invalidates the in-memory state of prepared transactions during replication rollback by
- * clearing _oldestActiveOplogEntryOpTimes. This data structure should be properly reconstructed
- * during replication recovery.
- */
- void clearOpTimes();
-
private:
/**
* Returns the oldest read timestamp in use by any open unprepared transaction. This will
@@ -129,14 +100,6 @@ private:
*/
static Timestamp _getOldestOpenUnpreparedReadTimestamp(OperationContext* opCtx);
- //
- // Member variables, excluding atomic variables, are labeled with the following code to
- // indicate the synchronization rules for accessing them.
- //
- // (M) Reads and writes guarded by _mutex
- //
- mutable stdx::mutex _mutex;
-
// The number of multi-document transactions currently active.
AtomicWord<unsigned long long> _currentActive{0};
@@ -166,11 +129,6 @@ private:
// The current number of transactions in the prepared state.
AtomicWord<unsigned long long> _currentPrepared{0};
-
- // Maintain the oldest oplog entry OpTime across all active transactions. Currently, we only
- // write an oplog entry for an ongoing transaction if it is in the `prepare` state. By
- // maintaining an ordered set of OpTimes, the OpTime at the beginning will be the oldest.
- std::set<repl::OpTime> _oldestActiveOplogEntryOpTimes; // (M)
};
} // namespace mongo