[SERVER-29277] Two Phase Drops: implement dropDatabase changes to support 2-phase drops Created: 18/May/17  Updated: 30/Oct/23  Resolved: 27/Jun/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.10

Type: Task Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-29275 Two Phase Drops: implement collection... Closed
Documented
is documented by DOCS-10541 Docs for SERVER-29277: Two Phase Drop... Closed
Related
related to SERVER-29874 Two Phase Drops: dropDatabase does no... Closed
related to SERVER-29876 Two Phase Drops: dropDatabase should ... Closed
related to SERVER-31436 dropDatabase must check `ReplicationC... Closed
related to SERVER-32532 Two-phase dropDatabase may not replic... Closed
related to SERVER-29913 bulk_api.js should use runCommand() r... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-06-19, Repl 2017-07-10
Participants:

 Description   

Collection drops are deferred until commit point advances to or past optime of drop operation. For database drops, we wait until all the collection drops are committed. While we are waiting for the collection drops to be committed, any writes to the database will be rejected. While the collection drop oplog entries are written to the oplog before they enter the drop-pending state, the dropDatabase oplog entry is only written to the oplog when all the collection drops are committed.



 Comments   
Comment by Githook User [ 27/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 dropDatabase() waits for collection drops to be replicated before dropping database
Branch: master
https://github.com/mongodb/mongo/commit/beea8e5d090d269ca0a0390785bd417fcf4cfcf2

Comment by Githook User [ 27/Jun/17 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-29277 Automatically retry operations on DatabaseDropPending.

Overrides the Mongo.prototype.find(), Mongo.prototype.runCommand(), and
Mongo.prototype.runCommandWithMetadata() functions to automatically
retry (for up to 10 minutes) on a DatabaseDropPending error response.
The override is loaded in for only the FSM worker threads when running
with replication and therefore doesn't impact the runner's connection
or non-replica set configurations.
Branch: master
https://github.com/mongodb/mongo/commit/1871da3e8a38e7ac384c7bc0280017852f53d487

Comment by Githook User [ 26/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 support overriding of ReplicationCoordinatorMock::awaitReplication() and awaitReplicationOfLastOpForClient() return value
Branch: master
https://github.com/mongodb/mongo/commit/16ad451c561de9e242df5c276f9e3566566b400a

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 removed dropDatabase from list of ops to use in workload for mixed_storage_version_replication.js
Branch: master
https://github.com/mongodb/mongo/commit/615183c51b39f4d0ce3402ae5f520fbcd943a95f

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 fix mixed_storage_version_replication.js to always pass string to Mongo.getDB()
Branch: master
https://github.com/mongodb/mongo/commit/769afdf13a67d425da5667e836bdd5cc2898ab4c

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: Revert "SERVER-29277 disallow non-string db name arguments to Mongo.getDB()"

This reverts commit 630a397d19a935f46ba1d1cbd6a86dc02be7f278.
Branch: master
https://github.com/mongodb/mongo/commit/829ae5d66ef1195e5ce4a1c8b2aed10665dace6c

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 disallow non-string db name arguments to Mongo.getDB()
Branch: master
https://github.com/mongodb/mongo/commit/630a397d19a935f46ba1d1cbd6a86dc02be7f278

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 fixed commands_that_write_accept_wc_configRS.js to work with new dropDatabase two phase drops
Branch: master
https://github.com/mongodb/mongo/commit/67d75157ae993359575e5fb567557d82b016877e

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 fixed dropDatabase test cases in read_committed_with_catalog_changes.js to work with a replica set with less than a majority of nodes
Branch: master
https://github.com/mongodb/mongo/commit/358cf1d12d8c3787fe14fe4458a242186d12b3c0

Comment by Githook User [ 22/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 rollback_dropdb.js drops collection but leaves database around before shutting down primary
Branch: master
https://github.com/mongodb/mongo/commit/314bb79e49a6894e4f02202759055387039ed3fb

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 dropDatabase() sets dropPending flag in Database before dropping collections
Branch: master
https://github.com/mongodb/mongo/commit/0b52f9276cc30a0f22fa446477698f1e9d09ecf6

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 Database::createCollection() fails if dropDatabase is in the middle of a 2-phase drop
Branch: master
https://github.com/mongodb/mongo/commit/e394a1740ea14835efa31e3c6eba9d4dfa83cd74

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 add Database drop-pending flag

This flag is set to true when we are in the process of dropping a database.
Branch: master
https://github.com/mongodb/mongo/commit/b05d8d23aeaf87c728cfbfc7ba050536d845e808

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 remove no-op statement from DatabaseImpl::dropDatabase
Branch: master
https://github.com/mongodb/mongo/commit/ffd6256afcf943c7b9e8a23cf39736409786191a

Comment by Githook User [ 15/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 dropDatabase explicitly drops every collection before removing database
Branch: master
https://github.com/mongodb/mongo/commit/3ac29e19745e4a594bff892f3de8372159770565

Comment by Githook User [ 14/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 add dropDatabase unit test
Branch: master
https://github.com/mongodb/mongo/commit/2b2ea96ea4a926018dc02bfc1c33ebcfed8bc2a0

Comment by Githook User [ 14/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 oplog entries are never generated for operations on mmap-only system.namespaces collections
Branch: master
https://github.com/mongodb/mongo/commit/ce0cf6a2d32ac48f54a8e4bca0adf48a4916f9be

Comment by Githook User [ 14/Jun/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-29277 oplog entries are never generated for operations on drop-pending collections
Branch: master
https://github.com/mongodb/mongo/commit/be360921c168dc7436651543ed9ef705d981cf18

Generated at Thu Feb 08 04:20:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.