-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
Repl 2017-06-19
-
0
The current two-phase drop logic in DatabaseImpl::dropCollectionEvenIfSystem() applies to both replica sets and master/slave. This is unnecessary because 2 phase drops are designed to support rollback, which is not applicable to master/slave.
database_impl.cpp
// Drop unreplicated collections immediately. // If 'dropOpTime' is provided, we should proceed to rename the collection. auto replCoord = repl::ReplicationCoordinator::get(opCtx); auto opObserver = getGlobalServiceContext()->getOpObserver(); auto isOplogDisabledForNamespace = replCoord->isOplogDisabledFor(opCtx, fullns); if (dropOpTime.isNull() && isOplogDisabledForNamespace) { auto status = _finishDropCollection(opCtx, fullns, collection); if (!status.isOK()) { return status; } opObserver->onDropCollection(opCtx, fullns, uuid); return Status::OK(); }