Secondary Index Paths — Local Versus Global

Secondary Index Paths — Local Versus Global A data-flow diagram generated by Archify. 01 / Write 02 / Index 03 / Query 04 / Results Write a record · record id known · 01 / Write · 1 base shard Write a record record id known 1 base shard Local index entry · same shard commit · 02 / Index · no cross-shard write Local index entry same shard commit no cross-shard write Scatter query · term only, no id · 03 / Query · 4 RPCs Scatter query term only, no id 4 RPCs Merge and revalidate · check base · 04 / Results · tail latency Merge and revalidate check base tail latency Write a record · 2 terms · 01 / Write · 1 base + outbox Write a record 2 terms 1 base + outbox Global index shards · sharded by term · 02 / Index · versioned, async Global index shards sharded by term versioned, async Term lookup · postings, 1 shard · 03 / Query · stale possible Term lookup postings, 1 shard stale possible Fetch and filter · ids to base shards · 04 / Results · phantoms dropped Fetch and filter ids to base shards phantoms dropped same-shard transaction write path ask all 4 shards scatter merge, delete wins gather base plus outbox relay write fan-out one shard per term targeted read ids may be stale record fetch Legend primary data data store data flow