summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaley Connelly <haley.connelly@mongodb.com>2022-06-08 09:51:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-08 10:19:06 +0000
commit43e456fb06cd041e9436d7c5ca432da5aa295b05 (patch)
tree8e1a2a8f8191aefd7115832d46afef95bb604e3a
parentec31b541647706f74577324d8c00ff537c257228 (diff)
downloadmongo-43e456fb06cd041e9436d7c5ca432da5aa295b05.tar.gz
SERVER-61789 Prevent repltest MODE_IX to MODE_X Global upgrade
-rw-r--r--src/mongo/dbtests/repltests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp
index c3b5952029c..a929a347030 100644
--- a/src/mongo/dbtests/repltests.cpp
+++ b/src/mongo/dbtests/repltests.cpp
@@ -129,6 +129,8 @@ public:
createOplog(&_opCtx);
+ // Prevent upgrading from MODE_IX to MODE_X when deleteAll() is issued.
+ Lock::GlobalWrite lk(&_opCtx);
dbtests::WriteContextForTests ctx(&_opCtx, ns());
WriteUnitOfWork wuow(&_opCtx);