Skip to content

Commit cfef399

Browse files
committed
Update Protos for Tqdt
1 parent 1624298 commit cfef399

4 files changed

Lines changed: 38 additions & 10 deletions

File tree

proto/collections.proto

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ enum Datatype {
1111
Float32 = 1;
1212
Uint8 = 2;
1313
Float16 = 3;
14+
Turbo4 = 4;
1415
}
1516

1617
// ---------------------------------------------
@@ -307,10 +308,14 @@ message OptimizersConfigDiff {
307308
// If 0 - no optimization threads, optimizations will be disabled.
308309
optional MaxOptimizationThreads max_optimization_threads = 9;
309310

310-
// If this option is set, service will try to prevent creation of large unoptimized segments.
311-
// When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
312-
// Updates will be resumed when optimization is completed and segments are optimized below the threshold.
313-
// Using this option may lead to increased delay between submitting an update and its application.
311+
// If enabled, the service will try to prevent the creation of large unoptimized segments.
312+
// When enabled, new points written to segments larger than the indexing threshold are stored
313+
// as "deferred points": they are persisted in the WAL and segments, but excluded from
314+
// read/search results until the corresponding segments are optimized (e.g. indexed,
315+
// quantized, or moved to mmap storage).
316+
// Update requests with wait=true will only return after the deferred points become visible,
317+
// which may significantly increase the perceived latency between submitting an update and its
318+
// completion. Update requests with wait=false are not affected.
314319
// Default is disabled.
315320
optional bool prevent_unoptimized = 10;
316321
}
@@ -445,6 +450,9 @@ message StrictModeConfig {
445450
// Reject memory-consuming update operations when process resident memory exceeds this percentage of total RAM (cgroup-aware, 1-100).
446451
// Delete-style operations are still allowed so memory can be freed.
447452
optional uint32 max_resident_memory_percent = 21;
453+
// Reject disk-consuming update operations when the filesystem hosting Qdrant storage exceeds this percentage of total capacity (1-100).
454+
// Free space is sampled with a small TTL cache so the gate may take a few seconds to react. Delete-style operations are still allowed so disk can be freed.
455+
optional uint32 max_disk_usage_percent = 22;
448456
}
449457

450458
message StrictModeSparseConfig {

proto/points.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ message DenseVectorCreationConfig {
362362
Distance distance = 2;
363363
// Configuration for multi-vector search (e.g., ColBERT)
364364
optional MultiVectorConfig multivector_config = 3;
365-
// Data type of the vectors (Float32, Float16, Uint8)
365+
// Data type of the vectors (Float32, Float16, Uint8, Turbo4)
366366
optional Datatype datatype = 4;
367367
}
368368

src/builders/strict_mode_config_builder.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub struct StrictModeConfigBuilder {
2424
pub(crate) max_points_count: Option<Option<u64>>,
2525
pub(crate) max_payload_index_count: Option<Option<u64>>,
2626
pub(crate) max_resident_memory_percent: Option<Option<u32>>,
27+
pub(crate) max_disk_usage_percent: Option<Option<u32>>,
2728
}
2829

2930
impl StrictModeConfigBuilder {
@@ -153,6 +154,12 @@ impl StrictModeConfigBuilder {
153154
new
154155
}
155156

157+
pub fn max_disk_usage_percent(self, value: u32) -> Self {
158+
let mut new = self;
159+
new.max_disk_usage_percent = Option::Some(Option::Some(value));
160+
new
161+
}
162+
156163
fn build_inner(self) -> Result<StrictModeConfig, std::convert::Infallible> {
157164
Ok(StrictModeConfig {
158165
enabled: self.enabled.unwrap_or_default(),
@@ -180,6 +187,7 @@ impl StrictModeConfigBuilder {
180187
max_points_count: self.max_points_count.unwrap_or_default(),
181188
max_payload_index_count: self.max_payload_index_count.unwrap_or_default(),
182189
max_resident_memory_percent: self.max_resident_memory_percent.unwrap_or_default(),
190+
max_disk_usage_percent: self.max_disk_usage_percent.unwrap_or_default(),
183191
})
184192
}
185193
/// Create an empty builder, with all fields set to `None` or `PhantomData`.
@@ -206,6 +214,7 @@ impl StrictModeConfigBuilder {
206214
max_points_count: core::default::Default::default(),
207215
max_payload_index_count: core::default::Default::default(),
208216
max_resident_memory_percent: core::default::Default::default(),
217+
max_disk_usage_percent: core::default::Default::default(),
209218
}
210219
}
211220
}

src/qdrant.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -685,10 +685,14 @@ pub struct OptimizersConfigDiff {
685685
/// If 0 - no optimization threads, optimizations will be disabled.
686686
#[prost(message, optional, tag = "9")]
687687
pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
688-
/// If this option is set, service will try to prevent creation of large unoptimized segments.
689-
/// When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
690-
/// Updates will be resumed when optimization is completed and segments are optimized below the threshold.
691-
/// Using this option may lead to increased delay between submitting an update and its application.
688+
/// If enabled, the service will try to prevent the creation of large unoptimized segments.
689+
/// When enabled, new points written to segments larger than the indexing threshold are stored
690+
/// as "deferred points": they are persisted in the WAL and segments, but excluded from
691+
/// read/search results until the corresponding segments are optimized (e.g. indexed,
692+
/// quantized, or moved to mmap storage).
693+
/// Update requests with wait=true will only return after the deferred points become visible,
694+
/// which may significantly increase the perceived latency between submitting an update and its
695+
/// completion. Update requests with wait=false are not affected.
692696
/// Default is disabled.
693697
#[prost(bool, optional, tag = "10")]
694698
pub prevent_unoptimized: ::core::option::Option<bool>,
@@ -898,6 +902,10 @@ pub struct StrictModeConfig {
898902
/// Delete-style operations are still allowed so memory can be freed.
899903
#[prost(uint32, optional, tag = "21")]
900904
pub max_resident_memory_percent: ::core::option::Option<u32>,
905+
/// Reject disk-consuming update operations when the filesystem hosting Qdrant storage exceeds this percentage of total capacity (1-100).
906+
/// Free space is sampled with a small TTL cache so the gate may take a few seconds to react. Delete-style operations are still allowed so disk can be freed.
907+
#[prost(uint32, optional, tag = "22")]
908+
pub max_disk_usage_percent: ::core::option::Option<u32>,
901909
}
902910
#[derive(Clone, PartialEq, ::prost::Message)]
903911
pub struct StrictModeSparseConfig {
@@ -1744,6 +1752,7 @@ pub enum Datatype {
17441752
Float32 = 1,
17451753
Uint8 = 2,
17461754
Float16 = 3,
1755+
Turbo4 = 4,
17471756
}
17481757
impl Datatype {
17491758
/// String value of the enum field names used in the ProtoBuf definition.
@@ -1756,6 +1765,7 @@ impl Datatype {
17561765
Self::Float32 => "Float32",
17571766
Self::Uint8 => "Uint8",
17581767
Self::Float16 => "Float16",
1768+
Self::Turbo4 => "Turbo4",
17591769
}
17601770
}
17611771
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1765,6 +1775,7 @@ impl Datatype {
17651775
"Float32" => Some(Self::Float32),
17661776
"Uint8" => Some(Self::Uint8),
17671777
"Float16" => Some(Self::Float16),
1778+
"Turbo4" => Some(Self::Turbo4),
17681779
_ => None,
17691780
}
17701781
}
@@ -4042,7 +4053,7 @@ pub struct DenseVectorCreationConfig {
40424053
/// Configuration for multi-vector search (e.g., ColBERT)
40434054
#[prost(message, optional, tag = "3")]
40444055
pub multivector_config: ::core::option::Option<MultiVectorConfig>,
4045-
/// Data type of the vectors (Float32, Float16, Uint8)
4056+
/// Data type of the vectors (Float32, Float16, Uint8, Turbo4)
40464057
#[prost(enumeration = "Datatype", optional, tag = "4")]
40474058
pub datatype: ::core::option::Option<i32>,
40484059
}

0 commit comments

Comments
 (0)