summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rs_rollback.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-11-13 18:09:39 -0500
committerJudah Schvimer <judah@mongodb.com>2017-11-13 18:09:39 -0500
commit956a2d030f04e5bbb2213ac6052f10d82cd3ec74 (patch)
treecdddb75125b6db8d1b1d09ccc9bed0de3eaa0019 /src/mongo/db/repl/rs_rollback.cpp
parentc123712316907a0433a8c5f9db5fd7223a4bb320 (diff)
downloadmongo-956a2d030f04e5bbb2213ac6052f10d82cd3ec74.tar.gz
SERVER-31881 set collection temp status correctly in rollbackViaRefetch
Diffstat (limited to 'src/mongo/db/repl/rs_rollback.cpp')
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index 5ffe2cab16e..a0ffbedc496 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -1169,11 +1169,8 @@ void rollback_internal::syncFixUp(OperationContext* opCtx,
WriteUnitOfWork wuow(opCtx);
- // If the collection is temporary, we set the temp field to true. Otherwise, we do not
- // add the the temp field.
- if (options.temp) {
- cce->setIsTemp(opCtx, options.temp);
- }
+ // Set collection to whatever temp status is on the sync source.
+ cce->setIsTemp(opCtx, options.temp);
// Resets collection user flags such as noPadding and usePowerOf2Sizes.
if (options.flagsSet || cce->getCollectionOptions(opCtx).flagsSet) {