diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-02-09 10:56:31 -0500 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-02-09 10:56:31 -0500 |
commit | 1e9f9c65a8fa0cd642c7cc7df43949f00bc971fe (patch) | |
tree | 3291bd338c46b4ad16bdf0edc0496f3cff04b52e /src/mongo | |
parent | 528f55b00665a49f6b100172914a15489cf6ebfa (diff) | |
download | mongo-1e9f9c65a8fa0cd642c7cc7df43949f00bc971fe.tar.gz |
SERVER-33064 Remove 'allowUnsafeRenamesDuringInitialSync' flag
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 8ecce11c999..36a7df1ed51 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -121,11 +121,6 @@ namespace { */ Collection* _localOplogCollection = nullptr; -// Specifies whether we abort initial sync when attempting to apply a renameCollection operation. -// If set to true, users risk corrupting their data. This should only be enabled by expert users -// of the server who understand the risks this poses. -MONGO_EXPORT_SERVER_PARAMETER(allowUnsafeRenamesDuringInitialSync, bool, false); - PseudoRandom hashGenerator(std::unique_ptr<SecureRandom>(SecureRandom::create())->nextInt64()); // Synchronizes the section where a new Timestamp is generated and when it is registered in the @@ -1508,21 +1503,6 @@ Status applyCommand_inlock(OperationContext* opCtx, } } - // Applying renameCollection during initial sync to a collection without UUID might lead to - // data corruption, so we restart the initial sync. - if (fieldUI.eoo() && (mode == OplogApplication::Mode::kInitialSync) && - o.firstElementFieldName() == std::string("renameCollection")) { - if (!allowUnsafeRenamesDuringInitialSync.load()) { - return Status(ErrorCodes::OplogOperationUnsupported, - str::stream() - << "Applying renameCollection not supported in initial sync: " - << redact(op)); - } - warning() << "allowUnsafeRenamesDuringInitialSync set to true. Applying renameCollection " - "operation during initial sync even though it may lead to data corruption: " - << redact(op); - } - // During upgrade from 3.4 to 3.6, the feature compatibility version cannot change during // initial sync because we cannot do some operations with UUIDs and others without. // We do not attempt to parse the whitelisted ops because they do not have a collection |