-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding EMEA
-
Sharding EMEA 2023-01-23, Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20
The current behavior when we have a stale router is to automatically refresh the data placement and the index info, however, we could leverage on the Shard Versioning Protocol to only perform the data placement info lookup, and only lookup the indexes when necessary, preventing going twice to the config server when the collection does not have indexes.
The idea is the following, instead of acquiring the data, we can peek the index cache to see if the time have been advanced and simply return empty data if there is no data and the time haven't been advanced. This way, the first write in a stale router would get the data placement from the config server, and then it would go to the shard, without an index version in the request, and there, after SERVER-66864, if there is an index created in the shard, the write would throw SSV, and with the StaleConfig info we would advance the index cache, and retry the write, and this time, we will acquire the data from the config server.
- depends on
-
SERVER-66864 Add index version checks to versioning protocol
- Closed
- is depended on by
-
SERVER-62807 Ensure refresh performance is not affected by sharded catalog index refresh
- Closed