After the moveChunk command is run on a shard it will first bump the major version of the chunk it donated to a value that's greater than all chunks in the collection. When the migration completes, it will will bump both the major and minor versions of one other chunk in order to indicate to incoming requests that it no longer owns the donated chunk.
Because of the way the metadata cache is maintained, even though we write the new chunk version to the metadata, it does not get reflected in the shard's metadata cache. The problem is reproduced by the attached .js test, which runs split/move/mergeChunk commands and compares the cached metadata against what is written on the server and this test fails at the moveChunk step.
This does not constitute an actual correctness problem, because minor shard version differences do not require retargeting, but is confusing when inspecting the cached metadata state, so we should fix it.
The bug is reproducible in 3.0, 3.2 and 3.3.
- depends on
-
SERVER-22659 Implement commitChunkMigration command on the config server
- Closed