Repository navigation
Empty turbo quant - #8677
Empty turbo quant#8677
Conversation
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/quantization/src/lib.rs`:
- Line 9: The turboquant module is currently exported (pub mod turboquant) which
exposes EncodedVectorsTQ that still contains todo!() panics; make the module
internal until the implementation is finished by removing the pub (change pub
mod turboquant to mod turboquant) and also remove or stop any pub use/export of
EncodedVectorsTQ (search for EncodedVectorsTQ re-exports) so the unstable API is
not part of the public surface until encode/size/score are implemented.
In `@lib/quantization/src/turboquant/mod.rs`:
- Around line 67-77: The code currently only performs a debug_assert for
validate_vector_parameters in encode (and omits checks in the upsert path),
allowing malformed vectors in release builds; replace the debug-only check with
a real runtime validation: call validate_vector_parameters(data.clone(),
vector_parameters) at the start of encode and return an
Err(EncodingError::InvalidVectorParameters(...)) (or an appropriate
EncodingError) when it fails, and add the same runtime validation in the
upsert-related function(s) (the code around lines 219-230) before writing to
storage; reference validate_vector_parameters, encode, and the upsert function
so the validator runs in all builds and prevents writing malformed,
wrong-dimension vectors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7a6be9d1-9e00-49f2-ba0d-f100bf640160
📒 Files selected for processing (2)
lib/quantization/src/lib.rslib/quantization/src/turboquant/mod.rs
| pub mod kmeans; | ||
| pub mod p_square; | ||
| pub mod quantile; | ||
| pub mod turboquant; |
There was a problem hiding this comment.
Keep turboquant private until the stubbed API stops panicking.
Exporting the module here exposes EncodedVectorsTQ as public surface, but the new implementation still has todo!() in its encode/size/score paths. That turns basic use of the newly exported API into runtime panics instead of an unavailable/internal feature.
Suggested stopgap
-pub mod turboquant;
+mod turboquant;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pub mod turboquant; | |
| mod turboquant; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/quantization/src/lib.rs` at line 9, The turboquant module is currently
exported (pub mod turboquant) which exposes EncodedVectorsTQ that still contains
todo!() panics; make the module internal until the implementation is finished by
removing the pub (change pub mod turboquant to mod turboquant) and also remove
or stop any pub use/export of EncodedVectorsTQ (search for EncodedVectorsTQ
re-exports) so the unstable API is not part of the public surface until
encode/size/score are implemented.
There was a problem hiding this comment.
It's fine and part of the road map #8670
There was a problem hiding this comment.
@IvanPleshkov, understood — this is the scaffolding PR for the TurboQuant milestone tracked in #8670, and the public module exposure is intentional to allow downstream crates to reference it as the implementation fills in across subsequent PRs. I'll stand down on this suggestion.
( ´・‿・`)
🧠 Learnings used
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 6986
File: lib/segment/src/vector_storage/quantized/quantized_vectors.rs:81-84
Timestamp: 2025-08-11T07:57:01.399Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_vectors.rs`, the BitsStoreType parameter difference between single-vector and multi-vector Binary quantization is intentional: single-vector storage uses `EncodedVectorsBin<u128, ...>` to enable 128-bit SIMD/popcount optimizations for longer vectors, while multi-vector storage uses `EncodedVectorsBin<u8, ...>` because multivectors are typically shorter and benefit from byte-granular storage.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7043
File: lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs:86-90
Timestamp: 2025-08-15T11:42:00.297Z
Learning: In lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs, overflow protection for encoded_storage_size computation (quantized_vector_size * vectors_count) is implemented in PR `#7048`, using checked_mul with u64 casting to prevent silent overflow.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7009
File: lib/quantization/src/encoded_vectors_binary.rs:614-618
Timestamp: 2025-08-11T12:30:47.220Z
Learning: In `lib/quantization/src/encoded_vectors_binary.rs`, the `encode_two_bits_value` function has two paths: when `vector_stats` is available, it uses mean/stddev for accurate z-score based quantization boundaries; when stats are None (for appendable BQ), it falls back to a simple sign-based heuristic (positive -> (true, true), non-positive -> (false, false)). Having stats available provides higher accuracy for storage encoding.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7113
File: lib/quantization/src/encoded_vectors_binary.rs:515-525
Timestamp: 2025-08-21T13:45:05.899Z
Learning: The `EncodedStorage` trait in `lib/quantization/src/encoded_storage.rs` does not have a `quantized_vector_size()` method. To validate vector sizes from storage, use `get_vector_data(index).len()` to get the actual size of stored vectors.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7113
File: lib/quantization/src/encoded_vectors_u8.rs:202-211
Timestamp: 2025-08-21T13:43:52.191Z
Learning: The `quantized_vector_size()` method is available on the `EncodedVectors` trait, not on the `EncodedStorage` trait. The `EncodedStorage` trait provides methods like `get_vector_data`, `vectors_count`, `is_on_disk`, `upsert_vector`, `flusher`, `files`, and `immutable_files`.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7043
File: lib/segment/src/vector_storage/quantized/quantized_vectors.rs:857-857
Timestamp: 2025-08-15T11:41:10.629Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_vectors.rs`, the multivector offset storage has two different patterns: for RAM storage, offsets are collected into Vec<MultivectorOffset> and used directly; for MMAP storage, offsets are consumed to create a file via create_offsets_file_from_iter, then the file is loaded back as MultivectorOffsetsStorageMmap. The direct consumption of offsets iterator in the MMAP case is intentional.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7193
File: lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs:17-30
Timestamp: 2025-09-01T11:19:26.371Z
Learning: In lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs, the ChunkedMmapVectors underlying implementation does not validate against zero-sized vectors, so adding such validation in QuantizedChunkedMmapStorage::new is unnecessary and would be redundant.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7520
File: lib/quantization/src/p_square.rs:41-49
Timestamp: 2025-11-18T18:20:20.021Z
Learning: In lib/quantization/src/p_square.rs, IvanPleshkov prefers using defensive double-checks (e.g., `let Ok(x) = NotNan::new(x) else { return; }`) over `.unwrap()` even when a prior check guarantees success, to avoid panic-causing code and maintain defensive programming practices.
Learnt from: generall
Repo: qdrant/qdrant PR: 7183
File: lib/api/src/grpc/qdrant.rs:4263-4273
Timestamp: 2025-09-16T19:14:17.614Z
Learning: In qdrant, lib/api/src/grpc/qdrant.rs is auto-generated by prost-build; do not edit it directly. Make changes in lib/api/src/grpc/proto/points.proto (e.g., add [deprecated=true], doc comments, or encoding options), then regenerate the Rust code.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 6986
File: lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs:46-55
Timestamp: 2025-08-11T00:37:34.100Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs`, the `ChunkedVectors` used in `QuantizedRamStorage` is intentionally designed to be non-persistent during updates. The `push_vector` method only updates the in-memory vectors without flushing to disk, and this is expected behavior rather than a bug.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7048
File: lib/quantization/src/encoded_storage.rs:61-79
Timestamp: 2025-08-14T11:31:21.777Z
Learning: In test storage implementations (like TestEncodedStorage in lib/quantization/src/encoded_storage.rs), IvanPleshkov prefers to keep the code simple rather than adding complex overflow protection, since test storage is not used in production and can be allowed to panic on edge cases.
Learnt from: timvisee
Repo: qdrant/qdrant PR: 7526
File: src/wal_pop.rs:7-8
Timestamp: 2025-11-14T10:01:31.926Z
Learning: In the Qdrant codebase, development binaries (like src/wal_pop.rs) don't require explicit bounds checking for command-line arguments. Rust's built-in out-of-bounds panic is acceptable for these development tools.
Learnt from: generall
Repo: qdrant/qdrant PR: 6274
File: lib/segment/src/vector_storage/sparse/mmap_sparse_vector_storage.rs:233-233
Timestamp: 2025-03-29T17:43:28.174Z
Learning: In the qdrant codebase, `debug_assert!` is preferred over runtime checks that would panic in release builds to ensure production stability, even when validating conditions like vector sorting.
Learnt from: coszio
Repo: qdrant/qdrant PR: 7368
File: lib/shard/src/query/mod.rs:313-341
Timestamp: 2025-10-16T13:00:46.809Z
Learning: In the Qdrant codebase, for the `Feedback` query variant in `lib/shard/src/query/mod.rs`, validation for sparse vectors should happen down the line rather than early in the `query_enum_from_grpc_raw_query` function. The `Nearest` variant is treated as a special case where early validation with better error messages is acceptable.
Learnt from: generall
Repo: qdrant/qdrant PR: 7474
File: lib/collection/src/shards/transfer/stream_records.rs:46-55
Timestamp: 2025-11-02T19:16:42.527Z
Learning: In the Qdrant repository, do not flag compilation errors such as partial-move errors, type errors, or any syntax issues that would be caught by the Rust compiler during the build process.
Learnt from: generall
Repo: qdrant/qdrant PR: 8322
File: lib/edge/src/lib.rs:213-237
Timestamp: 2026-03-08T01:28:03.360Z
Learning: Use SaveOnDisk<T> from common::save_on_disk for atomic persist-then-swap semantics when a config or in-memory struct must be kept in memory and persisted atomically on mutation. Prefer SaveOnDisk<T> over combining parking_lot::RwLock<T> with manual save() calls. Note: write_optional (returns Option<T>) is appropriate for fallible mutations where returning None skips both save and swap. In the qdrant/qdrant repo, the type is located at lib/common/common/src/save_on_disk.rs; migrate relevant in-memory config mutations to use SaveOnDisk<T> to ensure atomic persistence.
Learnt from: generall
Repo: qdrant/qdrant PR: 8368
File: lib/common/common/src/disk_cache/controller.rs:129-129
Timestamp: 2026-03-17T19:36:24.259Z
Learning: In this repository, all builds target 64-bit systems. Do not flag casts from u64 to usize (for example file length via f.metadata()?.len() as usize) as potentially unsafe. These casts are acceptable because 32-bit targets are not supported. Apply this guidance across all Rust sources in the codebase unless explicit overrides exist.
| pub fn encode<'a>( | ||
| data: impl Iterator<Item = impl AsRef<[f32]> + 'a> + Clone, | ||
| mut storage_builder: impl EncodedStorageBuilder<Storage = TStorage>, | ||
| vector_parameters: &VectorParameters, | ||
| _count: usize, | ||
| bits: TQBits, | ||
| mode: TQMode, | ||
| meta_path: Option<&Path>, | ||
| stopped: &AtomicBool, | ||
| ) -> Result<Self, EncodingError> { | ||
| debug_assert!(validate_vector_parameters(data.clone(), vector_parameters).is_ok()); |
There was a problem hiding this comment.
Validate vector dimensions on both initial encode and upsert.
Line 77 only checks parameters in debug builds, and Lines 219-230 never check them at all. In release, malformed vectors can be written into storage and break the fixed-width assumptions this type relies on.
Suggested fix
) -> Result<Self, EncodingError> {
- debug_assert!(validate_vector_parameters(data.clone(), vector_parameters).is_ok());
+ validate_vector_parameters(data.clone(), vector_parameters)?;
@@
fn upsert_vector(
&mut self,
id: PointOffsetType,
vector: &[f32],
hw_counter: &HardwareCounterCell,
) -> std::io::Result<()> {
+ if vector.len() != self.metadata.vector_parameters.dim {
+ return Err(std::io::Error::new(
+ std::io::ErrorKind::InvalidInput,
+ format!(
+ "Vector length {} does not match vector parameters dim {}",
+ vector.len(),
+ self.metadata.vector_parameters.dim
+ ),
+ ));
+ }
let encoded_vector = Self::encode_vector(vector, self.metadata.bits, self.metadata.mode);
self.encoded_vectors.upsert_vector(
id,
bytemuck::cast_slice(encoded_vector.as_slice()),
hw_counter,Also applies to: 219-230
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@lib/quantization/src/turboquant/mod.rs` around lines 67 - 77, The code
currently only performs a debug_assert for validate_vector_parameters in encode
(and omits checks in the upsert path), allowing malformed vectors in release
builds; replace the debug-only check with a real runtime validation: call
validate_vector_parameters(data.clone(), vector_parameters) at the start of
encode and return an Err(EncodingError::InvalidVectorParameters(...)) (or an
appropriate EncodingError) when it fails, and add the same runtime validation in
the upsert-related function(s) (the code around lines 219-230) before writing to
storage; reference validate_vector_parameters, encode, and the upsert function
so the validator runs in all builds and prevents writing malformed,
wrong-dimension vectors.
There was a problem hiding this comment.
No, validation requires additional data read (vectors may be on disk). it's too expensive in prod to do such checks
There was a problem hiding this comment.
@IvanPleshkov, understood — validate_vector_parameters involves reading vector data that may be on disk, making it too costly for production builds. Using debug_assert! here is the right trade-off: it catches dimension mismatches in debug/test builds without incurring unnecessary I/O overhead in release. I'll retract the suggestion.
✏️ Learnings added
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 8677
File: lib/quantization/src/turboquant/mod.rs:67-77
Timestamp: 2026-04-15T08:06:51.157Z
Learning: In `lib/quantization/src/turboquant/mod.rs`, `validate_vector_parameters` is intentionally called only via `debug_assert!` in the `encode` function (and similarly not added to upsert paths) because it requires reading vector data that may be on disk, making it too expensive for production builds. The debug-only check is sufficient to catch mismatches during development and testing.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 6986
File: lib/segment/src/vector_storage/quantized/quantized_vectors.rs:81-84
Timestamp: 2025-08-11T07:57:01.399Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_vectors.rs`, the BitsStoreType parameter difference between single-vector and multi-vector Binary quantization is intentional: single-vector storage uses `EncodedVectorsBin<u128, ...>` to enable 128-bit SIMD/popcount optimizations for longer vectors, while multi-vector storage uses `EncodedVectorsBin<u8, ...>` because multivectors are typically shorter and benefit from byte-granular storage.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7043
File: lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs:86-90
Timestamp: 2025-08-15T11:42:00.297Z
Learning: In lib/segment/src/vector_storage/quantized/quantized_mmap_storage.rs, overflow protection for encoded_storage_size computation (quantized_vector_size * vectors_count) is implemented in PR `#7048`, using checked_mul with u64 casting to prevent silent overflow.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7009
File: lib/quantization/src/encoded_vectors_binary.rs:614-618
Timestamp: 2025-08-11T12:30:47.220Z
Learning: In `lib/quantization/src/encoded_vectors_binary.rs`, the `encode_two_bits_value` function has two paths: when `vector_stats` is available, it uses mean/stddev for accurate z-score based quantization boundaries; when stats are None (for appendable BQ), it falls back to a simple sign-based heuristic (positive -> (true, true), non-positive -> (false, false)). Having stats available provides higher accuracy for storage encoding.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7113
File: lib/quantization/src/encoded_vectors_binary.rs:515-525
Timestamp: 2025-08-21T13:45:05.899Z
Learning: The `EncodedStorage` trait in `lib/quantization/src/encoded_storage.rs` does not have a `quantized_vector_size()` method. To validate vector sizes from storage, use `get_vector_data(index).len()` to get the actual size of stored vectors.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7113
File: lib/quantization/src/encoded_vectors_u8.rs:202-211
Timestamp: 2025-08-21T13:43:52.191Z
Learning: The `quantized_vector_size()` method is available on the `EncodedVectors` trait, not on the `EncodedStorage` trait. The `EncodedStorage` trait provides methods like `get_vector_data`, `vectors_count`, `is_on_disk`, `upsert_vector`, `flusher`, `files`, and `immutable_files`.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7048
File: lib/quantization/src/encoded_storage.rs:61-79
Timestamp: 2025-08-14T11:31:21.777Z
Learning: In test storage implementations (like TestEncodedStorage in lib/quantization/src/encoded_storage.rs), IvanPleshkov prefers to keep the code simple rather than adding complex overflow protection, since test storage is not used in production and can be allowed to panic on edge cases.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7043
File: lib/segment/src/vector_storage/quantized/quantized_vectors.rs:857-857
Timestamp: 2025-08-15T11:41:10.629Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_vectors.rs`, the multivector offset storage has two different patterns: for RAM storage, offsets are collected into Vec<MultivectorOffset> and used directly; for MMAP storage, offsets are consumed to create a file via create_offsets_file_from_iter, then the file is loaded back as MultivectorOffsetsStorageMmap. The direct consumption of offsets iterator in the MMAP case is intentional.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 6986
File: lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs:46-55
Timestamp: 2025-08-11T00:37:34.100Z
Learning: In `lib/segment/src/vector_storage/quantized/quantized_ram_storage.rs`, the `ChunkedVectors` used in `QuantizedRamStorage` is intentionally designed to be non-persistent during updates. The `push_vector` method only updates the in-memory vectors without flushing to disk, and this is expected behavior rather than a bug.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7193
File: lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs:17-30
Timestamp: 2025-09-01T11:19:26.371Z
Learning: In lib/segment/src/vector_storage/quantized/quantized_chunked_mmap_storage.rs, the ChunkedMmapVectors underlying implementation does not validate against zero-sized vectors, so adding such validation in QuantizedChunkedMmapStorage::new is unnecessary and would be redundant.
Learnt from: coszio
Repo: qdrant/qdrant PR: 6609
File: lib/gridstore/src/blob.rs:46-59
Timestamp: 2025-06-02T18:10:47.203Z
Learning: In the Qdrant codebase, zerocopy crate is extensively used for safe byte-level operations across GPU operations, HNSW indices, memory-mapped structures, and serialization. When implementing Blob trait for generic Vec<T>, using zerocopy's FromBytes and IntoBytes traits is preferred over size_of::<T>() because it guarantees memory layout equals byte representation, making serialization safe and correct.
Learnt from: coszio
Repo: qdrant/qdrant PR: 7368
File: lib/shard/src/query/mod.rs:313-341
Timestamp: 2025-10-16T13:00:46.809Z
Learning: In the Qdrant codebase, for the `Feedback` query variant in `lib/shard/src/query/mod.rs`, validation for sparse vectors should happen down the line rather than early in the `query_enum_from_grpc_raw_query` function. The `Nearest` variant is treated as a special case where early validation with better error messages is acceptable.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 7113
File: lib/quantization/src/encoded_vectors_u8.rs:202-211
Timestamp: 2025-08-21T13:46:10.866Z
Learning: In `EncodedStorage` trait implementations, calling `get_vector_data(0)` for validation purposes is not safe because the storage may be empty (vectors_count() == 0), which would cause issues when trying to access the first vector.
Learnt from: generall
Repo: qdrant/qdrant PR: 7006
File: lib/collection/src/operations/point_ops.rs:501-528
Timestamp: 2025-08-10T18:31:56.855Z
Learning: In Qdrant, batch operations validate that `ids`, `vectors`, and `payloads` (if present) have matching lengths at the REST API level in `lib/api/src/rest/validate.rs` through the `Validate` trait implementation for `Batch`. This validation happens before data is converted to internal structures like `PointInsertOperationsInternal`, so methods operating on these internal structures can safely assume the lengths match.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 8329
File: lib/collection/src/config.rs:221-247
Timestamp: 2026-03-08T23:42:21.799Z
Learning: In `lib/collection/src/config.rs`, the `CollectionParams::get_deferred_point_id()` method intentionally uses the raw (unquantized) vector byte size (`datatype * dim`) to compute the deferred-point threshold. This is by design because the indexing threshold counts real vector sizes, not quantized sizes. Aligning this computation with the quantization-aware `to_base_vector_data()` logic would be incorrect here.
Learnt from: IvanPleshkov
Repo: qdrant/qdrant PR: 8246
File: lib/segment/src/segment/segment_ops.rs:691-696
Timestamp: 2026-02-27T19:23:32.828Z
Learning: In Qdrant segments, total_vector_count() and total_point_count() are architecturally bounded by PointOffsetType::MAX (u32::MAX). Direct casts from usize to PointOffsetType are safe when the value is known to be less than total_vector_count() or total_point_count(), as enforced by assertions in versions_store.rs and the segment's internal ID design.
Learnt from: generall
Repo: qdrant/qdrant PR: 7006
File: lib/collection/src/operations/verification/update.rs:158-174
Timestamp: 2025-08-10T18:30:02.986Z
Learning: In Qdrant's strict mode verification code (lib/collection/src/operations/verification/update.rs), exhaustive pattern matching without `..` is intentionally used for structs like PointsBatch and PointsList. This design pattern ensures compilation fails when new fields are added, forcing developers to explicitly consider how new fields should be handled in the indexed_filter_write method. This provides visibility and compile-time safety for struct evolution.
Learnt from: generall
Repo: qdrant/qdrant PR: 8322
File: lib/edge/src/lib.rs:213-237
Timestamp: 2026-03-08T01:28:03.360Z
Learning: Use SaveOnDisk<T> from common::save_on_disk for atomic persist-then-swap semantics when a config or in-memory struct must be kept in memory and persisted atomically on mutation. Prefer SaveOnDisk<T> over combining parking_lot::RwLock<T> with manual save() calls. Note: write_optional (returns Option<T>) is appropriate for fallible mutations where returning None skips both save and swap. In the qdrant/qdrant repo, the type is located at lib/common/common/src/save_on_disk.rs; migrate relevant in-memory config mutations to use SaveOnDisk<T> to ensure atomic persistence.
Learnt from: generall
Repo: qdrant/qdrant PR: 8368
File: lib/common/common/src/disk_cache/controller.rs:129-129
Timestamp: 2026-03-17T19:36:24.259Z
Learning: In this repository, all builds target 64-bit systems. Do not flag casts from u64 to usize (for example file length via f.metadata()?.len() as usize) as potentially unsafe. These casts are acceptable because 32-bit targets are not supported. Apply this guidance across all Rust sources in the codebase unless explicit overrides exist.
* copy from placeholder branch * empty impl
This PR adds a new empty Turbo Quant structure - base of all other changes for the TQ milestone.
This PR contains:
EncodedVectorsTQstructEncodedVectorstrait implencodeandloadmethodsThere are 5
todo!places where we need to implement the actual TQ algorithm:No tests or benches since this PR does not have a real TQ implementation. They will be added while TQ impl.