summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-09-05 11:38:13 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-09-05 11:38:13 -0400
commit28cef55d81126b04732eaa41ff8b20e45636dde1 (patch)
treed0cda6c94030f5b4f1d9a482551cf395c0ed70e9
parentbd982824a7967b5e518bf9255b8f5e051bdaff7d (diff)
downloadmongo-28cef55d81126b04732eaa41ff8b20e45636dde1.tar.gz
Revert "SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js"
This reverts commit bd982824a7967b5e518bf9255b8f5e051bdaff7d.
-rw-r--r--jstests/noPassthrough/read_concern_snapshot_catalog_invalidation.js9
-rw-r--r--src/mongo/db/transaction_participant.cpp6
2 files changed, 2 insertions, 13 deletions
diff --git a/jstests/noPassthrough/read_concern_snapshot_catalog_invalidation.js b/jstests/noPassthrough/read_concern_snapshot_catalog_invalidation.js
index eefbe613f84..ad8ce3a6337 100644
--- a/jstests/noPassthrough/read_concern_snapshot_catalog_invalidation.js
+++ b/jstests/noPassthrough/read_concern_snapshot_catalog_invalidation.js
@@ -15,17 +15,10 @@
const adminDB = testDB.getSiblingDB("admin");
const coll = testDB.getCollection(kCollName);
- // Waits for the operation to reach the "hangAfterPreallocateSnapshot" failpoint.
function waitForOp(curOpFilter) {
assert.soon(
function() {
- const res =
- adminDB
- .aggregate([
- {$currentOp: {}},
- {$match: {$and: [curOpFilter, {msg: "hangAfterPreallocateSnapshot"}]}}
- ])
- .toArray();
+ const res = adminDB.aggregate([{$currentOp: {}}, {$match: curOpFilter}]).toArray();
if (res.length === 1) {
return true;
}
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp
index b84088757a7..ba01744fff4 100644
--- a/src/mongo/db/transaction_participant.cpp
+++ b/src/mongo/db/transaction_participant.cpp
@@ -36,7 +36,6 @@
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/concurrency/lock_state.h"
#include "mongo/db/concurrency/locker.h"
-#include "mongo/db/curop_failpoint_helpers.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/repl/repl_client_info.h"
#include "mongo/db/server_parameters.h"
@@ -516,10 +515,7 @@ void TransactionParticipant::unstashTransactionResources(OperationContext* opCtx
// The Client lock must not be held when executing this failpoint as it will block currentOp
// execution.
- if (MONGO_FAIL_POINT(hangAfterPreallocateSnapshot)) {
- CurOpFailpointHelpers::waitWhileFailPointEnabled(
- &hangAfterPreallocateSnapshot, opCtx, "hangAfterPreallocateSnapshot");
- }
+ MONGO_FAIL_POINT_PAUSE_WHILE_SET(hangAfterPreallocateSnapshot);
}
Timestamp TransactionParticipant::prepareTransaction(OperationContext* opCtx) {