[SERVER-38603] KV Storage Engine should defer removing idents by registering the ident with the KVDropPendingIdentReaper Created: 13/Dec/18  Updated: 29/Oct/23  Resolved: 23/Dec/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.7

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

Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-12-31
Participants:

 Description   

In DatabaseImpl::dropCollectionEvenIfSystem(), we currently rename the collection to a <db>.system.drop.* namespace. With drop-pending ident support, we will instead invoke _finishDropCollection() to remove the collection from the catalog.

Subsequently, the KV storage engine will remove the collection from the KVCatalog. Rather than dropping the ident, the KVDatabaseCatalogEntryBase::RemoveCollectionChange will register the ident with the KVDropPendingIdentReaper using the commit timestamp from the RecoveryUnit.

With the new Timestamp notifier introduced in SERVER-38128, it is now possible for the KVStorageEngine to set up a listener for changes to either the oldest or checkpoint timestamps together with a KVDropPendingIdentReaper so that drop-pending idents with commit timestamps that precede the oldest timestamp can be safely removed.



 Comments   
Comment by Githook User [ 23/Dec/18 ]

Author:

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

Message: SERVER-38603 dropping a collection removes catalog entry immediately and defers ident drop

If drop-pending idents are supported by the storage engine, this disables the replication
layer system.drop.* namespaces in favor of having the storage engine manage the removal of
the idents from disk.
Branch: master
https://github.com/mongodb/mongo/commit/ee875286545864f80bcfcfa31936f83778c699e0

Comment by Githook User [ 22/Dec/18 ]

Author:

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

Message: SERVER-38603 remove unused boolean field from add/remove collection handlers.hbdefg

These fields are always set to true. The code that used to set these fields to false
was removed in commit 2cdc2a96e1c8779658fe0eab459dcc38cf01c54d.
Branch: master
https://github.com/mongodb/mongo/commit/8195b17e78a2f0617289e1d8f3b318e1f2c8f077

Comment by Githook User [ 22/Dec/18 ]

Author:

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

Message: SERVER-38603 add KVStorageEngineInterface.hbdefg

This helps to break the curcular dependency between KVDatabaseCatalogEntryBase
and KVStorageEngine.
Branch: master
https://github.com/mongodb/mongo/commit/c7124bb488ac67ed53db7e827d6da34242305b55

Comment by Githook User [ 22/Dec/18 ]

Author:

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

Message: SERVER-38603 KVStorageEngine removes drop-pending idents when the oldest timestamp advances.hdbefg
Branch: master
https://github.com/mongodb/mongo/commit/402ea2b4d8e616878c2e14a5fb6f2f86faaaada0

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