miroir/crates/miroir-proxy
jedarden ad1c9d011c feat(reshard): implement P5.1.e alias swap + dual-write stop
Implements the atomic alias swap step (plan §13.1 step 5) for online
resharding. This is the cutover phase where the alias flips from the
live index to the shadow index, stopping dual-write.

Changes:
- Add task_store field to ReshardExecutor and implement alias_swap()
  function using alias_swap_phase()
- Add AliasSwapFailed variant to MiroirError
- Add Serialize derive to AliasSwapResult for logging/metrics
- Create integration test suite (p5_1_e_reshard_alias_swap.rs) covering:
  - Atomic alias flip to shadow index
  - History recording for rollback capability
  - Error cases (nonexistent alias, multi-target alias)
  - History retention limits
  - Idempotency

The executor now properly performs the alias flip via task_store.flip_alias(),
which atomically updates the alias target and records history for rollback.
After this phase, client writes target ONLY the new index.

Closes: miroir-uhj.1.5

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:05:30 -04:00
..
admin-ui/dist feat(admin-ui): implement Canaries, Shadow Diff, CDC Inspector, Metrics, Settings sections (P5.19.d) 2026-05-24 13:27:52 -04:00
src fix(metrics): fix metric name collision + compilation fixes 2026-05-24 17:23:32 -04:00
static feat(search-ui): add embeddable modes and custom templates (P5.21.e) 2026-05-24 14:37:00 -04:00
tests feat(reshard): implement P5.1.e alias swap + dual-write stop 2026-05-24 18:05:30 -04:00
Cargo.toml fix(config): implement P6.1 pod resource envelope + fix compilation errors 2026-05-24 16:48:57 -04:00