Implements cross-index PK set + content hash comparator for online
resharding. Once backfill completes, the verify phase compares the
live and shadow indexes to ensure data consistency before alias swap.
Key implementation:
- Iterates every shard of live (old_shards) and shadow (new_shards)
via filter=_miroir_shard={id} paginated scan
- Streams PKs + content fingerprints into PK-keyed xxh3 buckets
(reuses §13.8's bucketed-Merkle machinery with PK-keyed bucketing
instead of shard-keyed, enabling comparison across different S)
- Asserts: (a) live PK set == shadow PK set, (b) content_hash matches
- Returns VerificationResults with discrepancies if any
Acceptance criteria:
- Live PK set size equals shadow PK set size
- Zero PKs only in live index
- Zero PKs only in shadow index
- Zero PKs with content hash mismatch
Closes: miroir-uhj.1.4
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| miroir-core | ||
| miroir-ctl | ||
| miroir-proxy | ||