Files
qdrant/lib/segment
generall fd5b93357e refactor(segment): finalize SegmentReadView shape; migrate read_range and lookup_internal_id
Step 1 of the SegmentReadView migration.

* `SegmentReadView` is expanded to its final field set, parameterised over
  four read-only traits (`IdTrackerRead`, `PayloadIndexRead`,
  `PayloadStorageRead`, `VectorDataRead`). A `SegmentReadViewFor<'s>` type
  alias hides the verbosity at call sites for `Segment`. Steps 2-11 only
  add `impl` methods; the struct shape is now frozen.
* `Segment::with_view` borrows the three `AtomicRefCell`-wrapped storages
  up front and populates every view field; closure bound relaxed
  `Fn` -> `FnOnce`.
* `lookup_internal_id` (Option -> PointIdError conversion) and
  `read_range` (iterator + take_while) are migrated to the view. The
  previous Segment-side helpers become thin `with_view` delegators where
  external callers still rely on them.
* Trivial id-tracker getters (`has_point`, `is_empty`,
  `available_point_count`, `deleted_point_count`, `total_point_count`)
  stay implemented directly on `Segment` -- one-liners that
  `ReadOnlySegment` will reimplement just as cheaply, no shared logic to
  factor out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 13:31:35 +02:00
..
2024-06-13 21:16:29 +02:00