diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2020-10-02 12:11:06 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-02 10:59:46 +0000 |
commit | e74a37aa35b12f4151d2faadad0991f31d897065 (patch) | |
tree | 509ed258f746dc8b13825eab2ab723a8b2586419 /src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h | |
parent | 49e617b554b2c6c144f29c1f3e97d49e4e1a6944 (diff) | |
download | mongo-e74a37aa35b12f4151d2faadad0991f31d897065.tar.gz |
Revert "SERVER-48771 Enforce constraints on multi timestamp storage transactions"
This reverts commit 0760780e4afa55be377c2a1a47b43e29132478df.
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h index 3117c3855a5..292ebe8f049 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h @@ -34,7 +34,6 @@ #include <boost/optional.hpp> #include <cstdint> #include <memory> -#include <stack> #include <vector> #include "mongo/base/checked_cast.h" @@ -171,10 +170,6 @@ public: void refreshSnapshot() override; - void ignoreAllMultiTimestampConstraints() { - _multiTimestampConstraintTracker.ignoreAllMultiTimestampConstraints = true; - } - // ---- WT STUFF WiredTigerSession* getSession(); @@ -207,14 +202,6 @@ public: } void assertInActiveTxn() const; - /** - * This function must be called when a write operation is performed on the active transaction - * for the first time. - * - * Must be reset when the active transaction is either committed or rolled back. - */ - void setTxnModified(); - boost::optional<int64_t> getOplogVisibilityTs(); static WiredTigerRecoveryUnit* get(OperationContext* opCtx) { @@ -259,27 +246,11 @@ private: */ Timestamp _getTransactionReadTimestamp(WT_SESSION* session); - /** - * Keeps track of constraint violations on multi timestamp transactions. If a transaction sets - * multiple timestamps, the first timestamp must be set prior to any writes. Vice-versa, if a - * transaction writes a document before setting a timestamp, it must not set multiple - * timestamps. - */ - void _updateMultiTimestampConstraint(Timestamp timestamp); - WiredTigerSessionCache* _sessionCache; // not owned WiredTigerOplogManager* _oplogManager; // not owned UniqueWiredTigerSession _session; bool _isTimestamped = false; - // Helpers used to keep track of multi timestamp constraint violations on the transaction. - struct MultiTimestampConstraintTracker { - bool isTxnModified = false; - bool txnHasNonTimestampedWrite = false; - bool ignoreAllMultiTimestampConstraints = false; - std::stack<Timestamp> timestampOrder = {}; - } _multiTimestampConstraintTracker; - // Specifies which external source to use when setting read timestamps on transactions. ReadSource _timestampReadSource = ReadSource::kNoTimestamp; |