diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-08-03 13:44:17 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-08-03 13:44:17 -0400 |
commit | ce41c7bb609db8f33c6b3a04547325d01605cbc8 (patch) | |
tree | 64805de5779780303d2d625d17eabe45e5dbcfc0 | |
parent | cf38c1b8a0a8dca4a11737581beafef4fe120bcd (diff) | |
download | mongo-ce41c7bb609db8f33c6b3a04547325d01605cbc8.tar.gz |
SERVER-30487 Make sharding range deleter yield the WT snapshot after each iteration
-rw-r--r-- | src/mongo/db/dbhelpers.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index ebed6807c7e..fbf979277e2 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -283,6 +283,7 @@ long long Helpers::removeRange(OperationContext* txn, BSONObj max; { + ScopedTransaction scopedXact(txn, MODE_IS); AutoGetCollectionForRead ctx(txn, ns); Collection* collection = ctx.getCollection(); if (!collection) { @@ -331,6 +332,7 @@ long long Helpers::removeRange(OperationContext* txn, while (1) { // Scoping for write lock. { + ScopedTransaction scopedXact(txn, MODE_IX); AutoGetCollection ctx(txn, NamespaceString(ns), MODE_IX, MODE_IX); Collection* collection = ctx.getCollection(); if (!collection) |