summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_participant.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-09-04 11:50:10 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-09-05 13:38:47 -0400
commitd9b5ba2d1710d7f52536ab9c53c3a68329f61b90 (patch)
treee677e4cb3a568bae8d75fb5e7e9b9618df749ca8 /src/mongo/db/transaction_participant.cpp
parentfbf57dfc196c3e4d6b0313cadb71f10138b9c018 (diff)
downloadmongo-d9b5ba2d1710d7f52536ab9c53c3a68329f61b90.tar.gz
SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js
Diffstat (limited to 'src/mongo/db/transaction_participant.cpp')
-rw-r--r--src/mongo/db/transaction_participant.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp
index ba01744fff4..b84088757a7 100644
--- a/src/mongo/db/transaction_participant.cpp
+++ b/src/mongo/db/transaction_participant.cpp
@@ -36,6 +36,7 @@
#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"
@@ -515,7 +516,10 @@ void TransactionParticipant::unstashTransactionResources(OperationContext* opCtx
// The Client lock must not be held when executing this failpoint as it will block currentOp
// execution.
- MONGO_FAIL_POINT_PAUSE_WHILE_SET(hangAfterPreallocateSnapshot);
+ if (MONGO_FAIL_POINT(hangAfterPreallocateSnapshot)) {
+ CurOpFailpointHelpers::waitWhileFailPointEnabled(
+ &hangAfterPreallocateSnapshot, opCtx, "hangAfterPreallocateSnapshot");
+ }
}
Timestamp TransactionParticipant::prepareTransaction(OperationContext* opCtx) {