As part of
SERVER-56786 we changed the merge chunks commit path on the config server to iterate the chunks using this query. However, this query doesn't include the ns field and because of this it becomes a collection scan.
The query should be changed to (1) include the ns, (2) exclude the epoch and (3) exclude the max value and substitute it with $lt on the min field. That way it can be satisfied from the ns_1_shard_1_min_1 index directly instead of having to inspect the document.
- is related to
SERVER-56786 There are three routing info refreshes and two chunk scans on the mergeChunks path