[SERVER-22659] Implement commitChunkMigration command on the config server Created: 16/Feb/16  Updated: 05/Jul/16  Resolved: 22/Jun/16

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

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Dianna Hohensee (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-24443 Add repl::ReadConcernArgs to Shard::e... Closed
is depended on by SERVER-23678 Cached minor shard version does not m... Closed
Gantt Dependency
has to be done before SERVER-24413 Send ChunkVersions with the CommitChu... Closed
has to be done before SERVER-24397 Refactor and improve applyChunkOpsDep... Closed
Related
related to SERVER-24031 Prevent cleanupOrphan from deleting m... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 14 (05/13/16), Sharding 15 (06/03/16), Sharding 16 (06/24/16)
Participants:

 Description   

Introduce a commitChunkMigration command, only available on the config server, with the following arguments:

  • migratedChunk (bson) - complete description of a chunk, which is being migrated.
  • controlChunk (bson, optional) - complete description of a chunk owned by the same shard as the migrated chunk, but which does not move. This value will be missing if the migrateChunk is the last chunk being moved off a given shard.
  • newShard (string) - name of a shard to which the migratedChunk is being moved.

This command internally, using a centralized version generation source will produce a new chunk version to be used for the migrated and control chunks, similarly to the logic that is currently used, and updates the config.chunks collection with the new versions, encompassing the writes performs as part of ‘applyOps’ today. Additionally it will return a bson response with the following contents:

  • migratedChunkVersion - newly generated version for the migrated chunk
  • controlChunkVersion - newly generated version for the control chunk

One thing to be considered is whether this command should only be made available if the server is running in config server mode.



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

Author:

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

Message: SERVER-22659 Adding CommitChunkMigration command on the config server.
Branch: master
https://github.com/mongodb/mongo/commit/e90b12837bf13891da5153173dff8a4f36d347cd

Comment by Dianna Hohensee (Inactive) [ 16/Jun/16 ]

Depends on SERVER-24443 in order to specify the read concern for the recovery unit, rather than always defaulting to setting the read from majority committed snapshot.

WiredTiger will return a WriteConflictException if read from majority snapshot is set on the recovery unit when you go to do a write. So doing reads with the default majority committed snapshot, and then trying to do writes won't work, which it what the CommitChunkMigration command must do.

Comment by Dianna Hohensee (Inactive) [ 09/Jun/16 ]

Code review: https://mongodbcr.appspot.com/74000001/

Comment by Githook User [ 01/Jun/16 ]

Author:

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

Message: SERVER-22659 Changing ShardingState::refreshMetadataNow to correctly handle updating from a nonzero shardVersion to a remote shardVersion of 0000|0.
Branch: master
https://github.com/mongodb/mongo/commit/b02759c687efcde72a0343532ae4c1b896d1db64

Comment by Githook User [ 27/May/16 ]

Author:

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

Message: SERVER-22659 No need to redundantly set the metadata after refreshMetadataNow is called.
Branch: master
https://github.com/mongodb/mongo/commit/8681cd17ba80e6a360ed1104de066636d22d5cc4

Comment by Githook User [ 23/May/16 ]

Author:

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

Message: SERVER-22659 when commit chunk command fails, refresh collection metadata on shard to double check.
Branch: master
https://github.com/mongodb/mongo/commit/e8b9e58753de0d44bc978baa3fef72dcf47d0d1b

Comment by Githook User [ 18/May/16 ]

Author:

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

Message: SERVER-22659 removing _uncommittedMetadata local variable
Branch: master
https://github.com/mongodb/mongo/commit/1dd7a1ee81dbd1888dfc00fd658677bd444c9932

This commit incidentally fixes a bug in master that SERVER-24031 will correct in the v3.2 and v3.0 branches.

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