[SERVER-26213] Remove MigrationManager::CollectionMigrationsState::distLockHandle variable or remove MigrationManager's constant value distlock lockSessionID Created: 21/Sep/16  Updated: 05/Apr/17  Resolved: 27/Jan/17

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
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 before SERVER-25758 Add unit testing for new variation of... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-01-02, Sharding 2017-02-13
Participants:

 Description   

Since the MigrationManager is using a constant value as a lock session id, which is what DistLockHandle is, there is no longer a need for MigrationManager::CollectionMigrationsState to store this value. DistLockHandle will always be equal to MigrationManager::_lockSessionID for every balancer instance.

Remove the MigrationManager::CollectionMigrationsState struct's distLockHandle variable, and clean up the MigrationManager code a bit because it no longer needs to handle it.

OR: ------------

Get rid of the constant lockSessionID value per balancer instance. This commit is then revertible. This would probably involve creating the MigrationManager::CollectionMigrationState objects in MigrationManager::startRecoveryAndAcquireDistLocks



 Comments   
Comment by Githook User [ 27/Jan/17 ]

Author:

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

Message: SERVER-26213 Remove MigrationManager::CollectionMigrationsState::distLockHandle variable
Branch: master
https://github.com/mongodb/mongo/commit/310ce16e32d0f2c110a0f8e2b11e0e0cbc1617ad

Comment by Dianna Hohensee (Inactive) [ 11/Jan/17 ]

Going forward with removing MigrationManager::CollectionMigrationsState::distLockHandle, rather than more extensive MigrationManager refactoring and cleaning up the DistLockManager. The work has already been put in to change the DistLockManager for the use cases of MigrationManager, and we don't want to spend more time making DistLockManager nicer when we're angling to remove it entirely.

Comment by Dianna Hohensee (Inactive) [ 11/Jan/17 ]

kaloian.manassiev, this is still applicable and should be done.

The MigrationManager is using MigrationManager::_lockSessionID to lock distlocks, then _lockSessionID's value is returned by the lock function and stored in MigrationManager::CollectionMigrationsState::distLockHandle. FInally, distLockHandle, which is the same as _lockSessionID, is used to unlock the distlock.

Comment by Kaloian Manassiev [ 10/Jan/17 ]

dianna.hohensee, can you see whether this is still applicable and necessary?

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