There are several range deletion utils and migration utils that are targeting range deletion documents by migration id. Purpose of this ticket is to change all such functions in order to target via collection UUID + range.
First reason (why range deletion utils must target by uuid + range)
In the legacy range deleter, targeting by migrationId ensures that duplicate migrations (on the same range of the same collection) are processed separately as 2 different entities, even though they really refer the same range.
Since the new range deleter service is registering duplicate tasks only once (as obvious, since they refer the same range), it is necessary to make sure that - when a range deletion is completed - all documents in config.rangeDeletions referring the completed deletion are removed.
Second reason (why migration utils must target by collection uuid + range)
At some point the new range deleter service will become a component independent from sharding, so util functions for range deletions can't possibly refer migration ids that are referring moveChunk operations.
- causes
-
SERVER-69777 Lock by dbName + UUID rather than namespace in cleanUpRange
- Closed