Repository navigation
refactor(segment): migrate info/size_info/telemetry to SegmentReadView (step 11) - #8882
Merged
Merged
Conversation
…metry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
dancixx
approved these changes
May 4, 2026
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
generall
added a commit
that referenced
this pull request
May 4, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
timvisee
pushed a commit
that referenced
this pull request
May 8, 2026
…w (step 11) (#8882) * refactor(index): extend VectorIndexRead and PayloadIndexRead for telemetry/info Two trait extensions (no defaults — every implementor must opt in): * \`VectorIndexRead::is_index\` — distinguishes a real index from a plain full-scan one. Used by reporting code. Moved out of inherent \`VectorIndexEnum::is_index\` into the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true). * \`PayloadIndexRead::get_telemetry_data\` — per-field-index telemetry. Moved out of inherent \`StructPayloadIndex::get_telemetry_data\` into the trait impl. \`PlainPayloadIndex\` returns an empty Vec. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(segment): migrate info/size_info/telemetry to SegmentReadView Step 11 of the SegmentReadView migration — the final logical step. New \`read_view/info.rs\` exposes builder methods: * \`build_size_info(uuid, segment_type, is_appendable)\` * \`build_info(uuid, segment_type, is_appendable)\` — same plus \`index_schema\` * \`build_telemetry(uuid, segment_type, is_appendable, config, detail)\` The trivial segment-level fields (\`uuid\`, \`segment_type\`, \`is_appendable\`, \`config\`) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits. \`Segment::size_info\`, \`info\`, and \`get_telemetry_data\` collapse to one-line \`with_view\` delegators that pass in the trivial fields. Cleanup: \`Segment::deferred_deleted_count\` is now unused (the view has its own equivalent helper); deleted. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Step 11 of the
SegmentReadViewmigration — the final logical step. Stacked on top of #8881.Two commits.
1. Trait extensions (no defaults — every implementor must opt in)
VectorIndexRead::is_index— distinguishes a real index from a plain full-scan one. Moved out of inherentVectorIndexEnum::is_indexinto the trait. Explicit impls on Plain (false), HNSW (true), Sparse* (true).PayloadIndexRead::get_telemetry_data— per-field-index telemetry. Moved out of inherentStructPayloadIndex::get_telemetry_datainto the trait impl.PlainPayloadIndexreturns an empty Vec.2. Step 11 — migration
New
read_view/info.rsexposes builder methods:build_size_info(uuid, segment_type, is_appendable)build_info(uuid, segment_type, is_appendable)— same plusindex_schemabuild_telemetry(uuid, segment_type, is_appendable, config, detail)The trivial segment-level fields (
uuid,segment_type,is_appendable,config) are passed in by the caller — they stay direct on each segment-type rather than going through the view. Everything else (vector data breakdown, payloads size, deferred counts, vector-index telemetry, payload-field telemetry, …) is computed once inside the view through the read traits.Segment::size_info,info, andget_telemetry_datacollapse to one-linewith_viewdelegators that pass in the trivial fields.Cleanup:
Segment::deferred_deleted_countis now unused (the view has its own equivalent helper); deleted.End of plan
This is the final step. After merge of #8867 → #8868 → … → #8881 → this,
impl ReadSegmentEntry for Segmentis fully a list ofwith_viewdelegators (plus the trivial getters that stay direct:version,is_proxy,vector_names,is_appendable,get_indexed_fields,segment_uuid,segment_type,config, plusall_vectorswhoseNamedVectors<'_>lifetime invariance fights the view borrow). All the heavy lifting lives onSegmentReadViewand is parametrised over the four read traits (IdTrackerRead,PayloadIndexRead,PayloadStorageRead,VectorDataRead) — ready to be reused byReadOnlySegment.Test plan
cargo check --workspace --all-targetscleancargo test -p segment --lib— 644 passed, 0 failedmold -run cargo clippy --workspace --all-targets— 0 warnings🤖 Generated with Claude Code