diff options
author | Judah Schvimer <judah@mongodb.com> | 2016-04-25 13:50:42 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2016-04-25 13:50:42 -0400 |
commit | ac3f0e4414201c8a33e1f48f8fb51e734acaf597 (patch) | |
tree | 77a7fd31215e5e39bb2733ce91a6d75de92ef8f6 | |
parent | 74c1d8599bed7b2481bd2e7d9f3814a02c789536 (diff) | |
download | mongo-ac3f0e4414201c8a33e1f48f8fb51e734acaf597.tar.gz |
SERVER-22694 removed setupSynchronousCommit() and goingToWaitUntilDurable()
-rw-r--r-- | src/mongo/db/commands/get_last_error.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/storage/recovery_unit.h | 7 | ||||
-rw-r--r-- | src/mongo/db/write_concern.cpp | 10 | ||||
-rw-r--r-- | src/mongo/db/write_concern.h | 8 |
5 files changed, 0 insertions, 27 deletions
diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp index 98fbdcb9049..19d262e4df5 100644 --- a/src/mongo/db/commands/get_last_error.cpp +++ b/src/mongo/db/commands/get_last_error.cpp @@ -263,7 +263,6 @@ public: } txn->setWriteConcern(writeConcern); - setupSynchronousCommit(txn); { stdx::lock_guard<Client> lk(*txn->getClient()); txn->setMessage_inlock("waiting for write concern"); diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index d151976c6f8..ffc0312cf95 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -263,7 +263,6 @@ void ApplyBatchFinalizerForJournal::_run() { } auto txn = cc().makeOperationContext(); - txn->recoveryUnit()->goingToWaitUntilDurable(); txn->recoveryUnit()->waitUntilDurable(); // We have to use setMyLastDurableOpTimeForward since this thread races with // logTransitionToPrimaryToOplog. diff --git a/src/mongo/db/storage/recovery_unit.h b/src/mongo/db/storage/recovery_unit.h index 47e25f94dc1..ec0f976e303 100644 --- a/src/mongo/db/storage/recovery_unit.h +++ b/src/mongo/db/storage/recovery_unit.h @@ -74,13 +74,6 @@ public: virtual bool waitUntilDurable() = 0; /** - * This is a hint to the engine that this transaction is going to call waitUntilDurable at - * the end. This should be called before any work is done so that transactions can be - * configured correctly. - */ - virtual void goingToWaitUntilDurable() {} - - /** * When this is called, if there is an open transaction, it is closed. On return no * transaction is active. This cannot be called inside of a WriteUnitOfWork, and should * fail if it is. diff --git a/src/mongo/db/write_concern.cpp b/src/mongo/db/write_concern.cpp index dfd8540fea6..3bde99387b7 100644 --- a/src/mongo/db/write_concern.cpp +++ b/src/mongo/db/write_concern.cpp @@ -58,16 +58,6 @@ static ServerStatusMetricField<TimerStats> displayGleLatency("getLastError.wtime static Counter64 gleWtimeouts; static ServerStatusMetricField<Counter64> gleWtimeoutsDisplay("getLastError.wtimeouts", &gleWtimeouts); - -void setupSynchronousCommit(OperationContext* txn) { - const WriteConcernOptions& writeConcern = txn->getWriteConcern(); - - if (writeConcern.syncMode == WriteConcernOptions::SyncMode::JOURNAL || - writeConcern.syncMode == WriteConcernOptions::SyncMode::FSYNC) { - txn->recoveryUnit()->goingToWaitUntilDurable(); - } -} - namespace { const std::string kLocalDB = "local"; } // namespace diff --git a/src/mongo/db/write_concern.h b/src/mongo/db/write_concern.h index 653871ffe12..2b18ff5c538 100644 --- a/src/mongo/db/write_concern.h +++ b/src/mongo/db/write_concern.h @@ -42,14 +42,6 @@ class OpTime; } /** - * If txn->getWriteConcern() indicates a durable commit level, - * marks the RecoveryUnit associated with "txn" appropriately. - * Provides a hint to the storage engine that - * particular operations will be waiting for their changes to become durable. - */ -void setupSynchronousCommit(OperationContext* txn); - -/** * Attempts to extract a writeConcern from cmdObj. * Verifies that the writeConcern is of type Object (BSON type) and * that the resulting writeConcern is valid for this particular host. |