Implement CollectionRangeDeleter::cleanupNextRange()
class CollectionRangeDeleter { public: CollectionRangeDeleter(NamespaceString nss); /** * Acquires the collection IX lock and checks whether there are new entries for the collection's * rangesToClean structure and if they are, deletes some small amount of entries and yields * using the standard query yielding logic. * * Returns true if there are more entries in the rangesToClean set or false otherwise. */ bool cleanupNextRange(); };
The CollectionRangeDeleter should also invariant (possibly in debug mode only) that none of the entries in the rangesToClean set overlap with active metadata.
In order to achieve above it is acceptable to make the CollectionRangeDeleter a friend of MetadataManager and CollectionShardingState.
- depends on
-
SERVER-24569 Maintain the 'rangesToClean' and 'metadataInUse' sets on chunk migrations
- Closed
- has to be done after
-
SERVER-25014 Create the CollectionRangeDeleter class shell without implementation
- Closed
- related to
-
SERVER-24367 Implement CollectionRangeDeleter task lifetime management
- Closed