...
BugZero found this defect 2631 days ago.
SERVER-29277 changed the behavior of dropDatabase such that it will drop all collections and wait for the drops to replicate before returning. However, if the only collections in the database at the time of the dropDatabase request are already in the drop-pending state (ie. in the .system.drop.* namespace), dropDatabase() will erroneously fail to detect any collections it needs to wait for and removes the database immediately. To fix this, dropDatabase() needs to detect any drop-pending collections and parse the most recent optime of these drop-pending collections that it will call ReplicationCoordinator::awaitReplication() with. This only applies to the case when dropDatabase() doesn't initiate any collection drops.
xgen-internal-githook commented on Thu, 29 Jun 2017 15:25:27 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 dropDatabase() waits for pending collection drops to complete Branch: master https://github.com/mongodb/mongo/commit/560b3f562832664c1cb09cdbf3a257493bad6ba8 xgen-internal-githook commented on Thu, 29 Jun 2017 14:18:10 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 ReplicationCoordinatorMock::AwaitReplicationReturnValueFunction accepts optime Branch: master https://github.com/mongodb/mongo/commit/b9be45f58636244600b992930abe6791c115cfa0 xgen-internal-githook commented on Wed, 28 Jun 2017 20:52:54 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 change tool_replset.js to drop collection instead of database Branch: master https://github.com/mongodb/mongo/commit/c14f4e64c98b70b118bc0f2ee9c575f189de0038 xgen-internal-githook commented on Wed, 28 Jun 2017 20:21:50 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 change oplog_all_ops.js to drop collection instead of the database Branch: master https://github.com/mongodb/mongo/commit/027b1151c78288f31e29f4b59dc41c9ed935fa79 xgen-internal-githook commented on Wed, 28 Jun 2017 19:17:10 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 stop using applyOps to run dropDatabase in user_defined_roles_on_secondaries.js Branch: master https://github.com/mongodb/mongo/commit/a1b8f8c9b2a6f3b115f517bd37e9a841e87c9eeb xgen-internal-githook commented on Wed, 28 Jun 2017 16:41:15 +0000: Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'} Message: SERVER-29876 read_committed_with_catalog_changes.js drops collection during the preparation phase instead of during the performOp phase so that dropDatabase does not block Branch: master https://github.com/mongodb/mongo/commit/58518c5174a1854060428e183ac6049c64ac0517