Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
-
Repl 2017-06-19
-
0
Description
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 |
|
450
|
// Drop unreplicated collections immediately. |
451
|
// If 'dropOpTime' is provided, we should proceed to rename the collection. |
452
|
auto replCoord = repl::ReplicationCoordinator::get(opCtx);
|
453
|
auto opObserver = getGlobalServiceContext()->getOpObserver();
|
454
|
auto isOplogDisabledForNamespace = replCoord->isOplogDisabledFor(opCtx, fullns);
|
455
|
if (dropOpTime.isNull() && isOplogDisabledForNamespace) { |
456
|
auto status = _finishDropCollection(opCtx, fullns, collection);
|
457
|
if (!status.isOK()) { |
458
|
return status; |
459
|
}
|
460
|
opObserver->onDropCollection(opCtx, fullns, uuid); |
461
|
return Status::OK(); |
462
|
}
|