[SERVER-34807] MovePrimarySourceManager::_cleanup() should clear recovery document if in state 'kCommitted', not 'kCloneCompleted' Created: 02/May/18  Updated: 29/Oct/23  Resolved: 18/May/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.7.9
Fix Version/s: 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2018-05-21
Participants:

 Description   

The MovePrimarySourceManager currently calls ShardingStateRecovery::endMetadataOp() if in state 'kCloneCompleted'.

This is probably an accident, since 'kCloneCompleted' state in the MigrationSourceManager and MovePrimarySourceManager represent different logical states:

MigrationSourceManager:

enum State {
 kCreated,
 kCloning,
 kCloneCaughtUp,
 kCriticalSection,
 kCloneCompleted,
 kDone
}; 

MovePrimarySourceManager:

enum State {
 kCreated,
 kCloning,
 kCloneCompleted,
 kCriticalSection,
 kCommitted,
 kNeedCleanStaleData,
 kDone
}; 

We should rename the MovePrimarySourceManager's states to match the MigrationSourceManager's.



 Comments   
Comment by Githook User [ 18/May/18 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com'}

Message: SERVER-34807 Rename states in movePrimary state machine to match migration
Branch: master
https://github.com/mongodb/mongo/commit/35e9928bf33c6270e3195a00c24fe7a09edf512e

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