In the chunk manager API we have different functions to get the shard ids necessary to target a command, so for example we could use getAllShardIds or getShardIdsForRange depending on the information available. However, there is a non predictable difference between these two functions, if we try to target an operation using getAllShardIds, the chunk manager would not consider if the routing table was previously obtained with a cluster time, but if we use getShardIdsForRange it would, causing problems like the one found in SERVER-87191.
The purpose of this ticket is to find out other wrong usages of the API by adding an invariant in targeting functions that do not check the cluster time but could be called with a routing table with a cluster time, and to determine the next steps to improve the API to avoid future confusion.
- is related to
-
SERVER-90141 Improve ChunkManager API to prevent misuse of unsafe methods when at point-in-time
- Backlog
- related to
-
SERVER-87191 Update without shard key might miss documents
- Closed
-
SERVER-88153 Bulk write without shard key using the single shard optimization may target documents incorrectly
- Closed
-
SERVER-88155 Timeseries update/delete without shard key using the single shard optimization may target incorrectly
- Closed
-
SERVER-88373 Remove incorrect usage of ChunkManager::getAllShardIds on point-in-time ChunkManager
- Closed