Here and here we use lower_bound instead of upper_bound to find the vector that contain the first chunk of the loop. The consequence is that when the start shard key is equal to the minKey of the first chunk of a vector, we will wrongly start iterating from the previous vector instead of the correct one.
This does not actually cause any correctness issue because in both cases the logic afterward will simply skip the initial wrong vector because it doesn't actually contain the initial shard Key.
In any case, this logic is wrong and should be fixed.
- is caused by
-
SERVER-71627 Refreshed cached collection route info will severely block all client request when a cluster with 1 million chunks
- Closed