[SERVER-25811] Send the collection version in the CommitChunkMigration command Created: 25/Aug/16  Updated: 19/Nov/16  Resolved: 31/Aug/16

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

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

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2016-09-19
Participants:

 Description   

With an upcoming change to the balancer we'll potentially abandon active migrations (and release their distlocks) on failover.

3.2 shards are fine, because they hold the distlock.

For 3.4 shards that expect the balancer to hold the distlock, they'll be running without the distlock. It will be possible for the following scenario to occur:

  • the balancer releases the distlock because of an error during migrations recovery
  • A drop occurs
  • The collection is recreated and the chunk exists again.
  • the balancer schedules another migration for the collection and reacquires the distlock
  • the 3.4 shard tries to commit the migration.

Thus, the CommitChunkMigration command must also take a collection version parameter from the shard, and compare its epoch value to the config server’s collection version’s epoch. If they don’t match, fail the commit command.



 Comments   
Comment by Githook User [ 31/Aug/16 ]

Author:

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

Message: SERVER-25811 send collection version with CommitChunkMigration command
Branch: master
https://github.com/mongodb/mongo/commit/d852a0716c3dbc34f2ca33dc183965926f726db8

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