Files
Andrey VasnetsovandClaude Sonnet 5 03a09ef51f fix: route append-only point deletion through delete_point_internal (#10199)
Alternative to #10188. Instead of skipping check_consistency_and_repair's
storage cleanup entirely on append-only segments, and keeping a separate
delete_point_tombstone_only helper that callers must remember to pick, fold
the append-only decision into delete_point_internal itself:

- delete_point_internal now branches on is_append_only_delete() internally:
  tombstone-only (id tracker drop only) when true, full payload/field-index
  clear + id-tracker drop otherwise.
- delete_point_tombstone_only is removed; both call sites (ordinary
  delete_point, and check_consistency_and_repair's cleanup of dangling
  versions found by fix_id_tracker_inconsistencies) now just call
  delete_point_internal, so the repair path gets correct append-only
  behavior for free instead of needing its own explicit check.
- version_tracker.set_payload (payload-storage version, used for partial
  snapshots) moves inside delete_point_internal too, gated behind the same
  branch: it's only bumped when payload storage is actually touched. Took
  the opportunity to also thread it through an explicit op_num: Option<..>
  parameter, since check_consistency_and_repair's repair pass has no real
  op_num to associate the change with.

This keeps "how to delete a point" a property of segment state rather than
something every caller has to branch on externally, which is what let the
original bug slip through check_consistency_and_repair in the first place.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-12 13:40:33 +02:00
..