[SERVER-24367] Implement CollectionRangeDeleter task lifetime management Created: 02/Jun/16  Updated: 18/Apr/17  Resolved: 02/Aug/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.3.11

Type: Task Priority: Major - P3
Reporter: Crystal Horn Assignee: Sam Dunietz
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done after SERVER-25011 Add a single-thread task executor for... Closed
has to be done after SERVER-25238 Change initialization of ShardingStat... Closed
Related
related to SERVER-28838 Coverity analysis defect 101169: Wrap... Closed
is related to SERVER-24573 Implement CollectionRangeDeleter rang... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 16 (06/24/16), Sharding 18 (08/05/16)
Participants:

 Description   

This task is to thread-through the creation and cleanup of the CollectionRangeDeleter object. A single instance must exist at any given time, if and only if there are entries in the MetadataManager::_rangesToClean object and it should be created the first time an entry is put in there.

You'll need to implement the following:

    CollectionRangeDeleter::run() {
        if (cleanupNext())
            (range deleter task executor).scheduleTask()
        else
            delete this
    }

And in MetadataManager, you'll need to create the CollectionRangeDeleter and schedule the task in MetadataManager::addToRTC, which should do so if the rangesToClean was previously empty. The CollectionRangeDeleter should be created on the heap, and then CollectionRangeDeleter::run() will handle deleting it when it is finished.

Once that is implemented, we'll need to figure out how to clean up the CollectionRangeDeleter object when the server crashes/shutsdown/something bad happens to the scheduled task on the task executor.

This also involves writing unit-tests.



 Comments   
Comment by Githook User [ 29/Jul/16 ]

Author:

{u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}

Message: SERVER-24367 Implement CollectionRangeDeleter task lifetime management
Branch: master
https://github.com/mongodb/mongo/commit/47a9c891ad77f6f26143ad35a7033fefabed4e82

Comment by Githook User [ 28/Jul/16 ]

Author:

{u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}

Message: Revert "SERVER-24367 Implement CollectionRangeDeleter task lifetime management"

This reverts commit 9a776eae4f669fdcfae94c41c0cbbea662d36c94.
Branch: master
https://github.com/mongodb/mongo/commit/60cf7576bc66c1ca82d9ab25f0b8340c837d05ac

Comment by Githook User [ 28/Jul/16 ]

Author:

{u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}

Message: SERVER-24367 Implement CollectionRangeDeleter task lifetime management
Branch: master
https://github.com/mongodb/mongo/commit/9a776eae4f669fdcfae94c41c0cbbea662d36c94

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