-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Sharding
The CommitChunkMigration command will be calling the applyOps command. Its needs are not met by the current applyChunkOpsDeprecated, which expects a precondition and adds a majority write concern by default.
Two changes:
1) Refactor applyChunkOpsDeprecated so CommitChunkMigration can use it.
2) Swap this command failure check catalog_manager_replica_set.cpp#L1597-L1636 with the more robust check here migration_source_manager.cpp#L382-L451
The second change will make sure applyChunkOpsDeprecated refreshes to the latest optime before querying the config.chunks collection. This way it knows to wait for the applyOps writes, and won't potentially miss them if they haven't propagated to a secondary by the time of the query to check on them. Using refreshMetadataNow allows us to check that the metadata was updated by the absence of the old chunk metadata, rather than requiring us to know what the new chunk metadata is, which will be unknown for moveChunk, since the config server generates it via CommitChunkMigration command, and should give merge and split more flexibility for future changes as well.
- has to be done after
-
SERVER-22659 Implement commitChunkMigration command on the config server
- Closed