[SERVER-29276] Two Phase Drops: Implement collection drop rollback logic Created: 18/May/17  Updated: 30/Oct/23  Resolved: 29/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: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-06-19, Repl 2017-07-10
Participants:

 Description   

Before 3.6, collection drops are executed immediately and the collections are removed from the storage upon completion of the user request processing. In 3.6, we defer the actual collection drops until the replica set has advanced to or past the optime of the drop operation. This makes it possible to recover the dropped collection in a rollback scenario.

When the node needs to roll back a collection drop oplog entry, it first finds the entry in the "task list" corresponding to the collection by UUID. It then renames the drop-pending collection back to its original name (gleaned from the oplog entry), and it removes the entry from the "task list".



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

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-29276 rolls back drop pending collections
Branch: master
https://github.com/mongodb/mongo/commit/103256372fc4f4cec1c736482c1ed520ee0de290

Comment by Githook User [ 23/Jun/17 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-29276 use OplogEntry class in rs_rollback.cpp
Branch: master
https://github.com/mongodb/mongo/commit/e987b3cbc59352df543001ab35d94b3f963adb37

Comment by Githook User [ 20/Jun/17 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-29276 adds functions to DropPendingCollectionReaper for rollback
Branch: master
https://github.com/mongodb/mongo/commit/da2e51bd03fd4e6a519eb170e301af36c8b8e420

Comment by Githook User [ 15/Jun/17 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-29276 adds renameCollection function to StorageInterface
Branch: master
https://github.com/mongodb/mongo/commit/f39cdb6b207f8b2e855b3b89cc060c833bb45372

Comment by Githook User [ 15/Jun/17 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-29276 make renameCollection error codes consistent
Branch: master
https://github.com/mongodb/mongo/commit/e66f19b24863e276ec0ddcdc1bf91dd4ceffa22a

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