Files
generall 8f82806318 Provision fresh appendable segments when all reach max_segment_size
Fixes appendable segment overflow (#9158): CoW-moving operations (e.g.
set_payload by filter over indexed segments) and plain inserts used to pick a
destination appendable segment without any size check, so a single large
operation could pile every moved point into one segment far past the
configured max_segment_size.

The update path now respects the resolved optimizer threshold, mirrored into
the segment holder as a soft size cap:

- CoW-move destinations are re-checked per moved point; candidates at the cap
  are skipped, and the insert loops refuse destinations that reached it.
- When no appendable segment has capacity left, the operation fails with the
  new recoverable `OperationError::OutOfAppendableCapacity`.
- `LockedSegmentHolder::update_with_segment_provisioning` catches that error,
  provisions a fresh appendable segment (same machinery the optimization
  worker already used between operations), and re-applies the operation;
  per-point version checks make the re-run resume where it left off, exactly
  like WAL replay.

The moving `process_*` entry points now take the segment holder lock plus an
optional `SegmentProvisioning`, wired from the update worker, WAL replay, and
failed-operation recovery. The edge shard passes no provisioning and no cap,
keeping its behavior unchanged.

The regression test from #9158 is included (adapted to configure the cap) and
now passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 09:30:35 +02:00
..
2026-07-07 16:25:57 +02:00
2026-07-07 14:53:15 +02:00