[SERVER-24031] Prevent cleanupOrphan from deleting migrating chunk data before commit Created: 03/May/16  Updated: 05/Apr/17  Resolved: 21/Jun/16

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

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Done Votes: 0
Labels: code-and-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-22659 Implement commitChunkMigration comman... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.0
Sprint: Sharding 15 (06/03/16), Sharding 16 (06/24/16)
Participants:

 Description   

cleanupOrphaned can be called between
MigrationSourceManager::enterCriticalSection and
MigrationSourceManager::commitDonateChunk. The _uncommittedMetadata variable is create and saved in MigrationSourceManager::enterCriticalSection, but the actual commit doesn't happen until MigrationSourceManager::commitDonateChunk is finished. cleanupOrphaned can sneak in between and use the _uncommittedMetadata saved state to decide the not yet committed chunk – which can still fail to be committed, thus we end up keeping the chunk data – is gone and then delete all the data.

The master fix is going in as a result of SERVER-22659 – the commit to remove the _uncommittedMetadata variable. It needs to be backported, and modified if necessary.



 Comments   
Comment by Githook User [ 21/Jun/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-24031 Prevent cleanupOrphaned from starting if a migration is running.
Branch: v3.2
https://github.com/mongodb/mongo/commit/dfe69f949be0e1aa83efcaaea07cc0c4639677bf

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