-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
from jordi.serra-torrens@mongodb.com
This is the SSCCL code that processes the changed chunks it fetched from the primary and writes them down to config.cache.chunks.<nss>. The process is roughly:
- For each changedChunk:
- Delete from config.cache.chunks.<nss> all entries that overlap with changedChunk (i.e. the delete filter is match $gte: changedChunk.min, $le: changedChunk.max)
- Insert changedChunk
This is the delete bit.
SERVER-81133attempted an optimization where the deletes are batched together in a single command. However, that command is still composed of N (1000) individual delete operations – one per changed chunk, rather than one single deleteOp with a filter that covers all the changedChunks in the batch.
Functionally, both are the same. But I suspect the first has some additional overhead. Because when processing the delete, each deleteOp is processed individually, and for each one of them a query plan is built, cursors established, etc.
- related to
-
SERVER-81133 Speedup logic to persist routing table cache
- Closed