Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions proto/collections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ enum Datatype {
Float32 = 1;
Uint8 = 2;
Float16 = 3;
Turbo4 = 4;
}

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

// If this option is set, service will try to prevent creation of large unoptimized segments.
// When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
// Updates will be resumed when optimization is completed and segments are optimized below the threshold.
// Using this option may lead to increased delay between submitting an update and its application.
// If enabled, the service will try to prevent the creation of large unoptimized segments.
// When enabled, new points written to segments larger than the indexing threshold are stored
// as "deferred points": they are persisted in the WAL and segments, but excluded from
// read/search results until the corresponding segments are optimized (e.g. indexed,
// quantized, or moved to mmap storage).
// Update requests with wait=true will only return after the deferred points become visible,
// which may significantly increase the perceived latency between submitting an update and its
// completion. Update requests with wait=false are not affected.
// Default is disabled.
optional bool prevent_unoptimized = 10;
}
Expand Down Expand Up @@ -445,6 +450,9 @@ message StrictModeConfig {
// Reject memory-consuming update operations when process resident memory exceeds this percentage of total RAM (cgroup-aware, 1-100).
// Delete-style operations are still allowed so memory can be freed.
optional uint32 max_resident_memory_percent = 21;
// Reject disk-consuming update operations when the filesystem hosting Qdrant storage exceeds this percentage of total capacity (1-100).
// 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.
optional uint32 max_disk_usage_percent = 22;
}

message StrictModeSparseConfig {
Expand Down
2 changes: 1 addition & 1 deletion proto/points.proto
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ message DenseVectorCreationConfig {
Distance distance = 2;
// Configuration for multi-vector search (e.g., ColBERT)
optional MultiVectorConfig multivector_config = 3;
// Data type of the vectors (Float32, Float16, Uint8)
// Data type of the vectors (Float32, Float16, Uint8, Turbo4)
optional Datatype datatype = 4;
}

Expand Down
9 changes: 9 additions & 0 deletions src/builders/strict_mode_config_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct StrictModeConfigBuilder {
pub(crate) max_points_count: Option<Option<u64>>,
pub(crate) max_payload_index_count: Option<Option<u64>>,
pub(crate) max_resident_memory_percent: Option<Option<u32>>,
pub(crate) max_disk_usage_percent: Option<Option<u32>>,
}

impl StrictModeConfigBuilder {
Expand Down Expand Up @@ -153,6 +154,12 @@ impl StrictModeConfigBuilder {
new
}

pub fn max_disk_usage_percent(self, value: u32) -> Self {
let mut new = self;
new.max_disk_usage_percent = Option::Some(Option::Some(value));
new
}

fn build_inner(self) -> Result<StrictModeConfig, std::convert::Infallible> {
Ok(StrictModeConfig {
enabled: self.enabled.unwrap_or_default(),
Expand Down Expand Up @@ -180,6 +187,7 @@ impl StrictModeConfigBuilder {
max_points_count: self.max_points_count.unwrap_or_default(),
max_payload_index_count: self.max_payload_index_count.unwrap_or_default(),
max_resident_memory_percent: self.max_resident_memory_percent.unwrap_or_default(),
max_disk_usage_percent: self.max_disk_usage_percent.unwrap_or_default(),
})
}
/// Create an empty builder, with all fields set to `None` or `PhantomData`.
Expand All @@ -206,6 +214,7 @@ impl StrictModeConfigBuilder {
max_points_count: core::default::Default::default(),
max_payload_index_count: core::default::Default::default(),
max_resident_memory_percent: core::default::Default::default(),
max_disk_usage_percent: core::default::Default::default(),
}
}
}
Expand Down
21 changes: 16 additions & 5 deletions src/qdrant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,10 +685,14 @@ pub struct OptimizersConfigDiff {
/// If 0 - no optimization threads, optimizations will be disabled.
#[prost(message, optional, tag = "9")]
pub max_optimization_threads: ::core::option::Option<MaxOptimizationThreads>,
/// If this option is set, service will try to prevent creation of large unoptimized segments.
/// When enabled, updates may be blocked at request level if there are unoptimized segments larger than indexing threshold.
/// Updates will be resumed when optimization is completed and segments are optimized below the threshold.
/// Using this option may lead to increased delay between submitting an update and its application.
/// If enabled, the service will try to prevent the creation of large unoptimized segments.
/// When enabled, new points written to segments larger than the indexing threshold are stored
/// as "deferred points": they are persisted in the WAL and segments, but excluded from
/// read/search results until the corresponding segments are optimized (e.g. indexed,
/// quantized, or moved to mmap storage).
/// Update requests with wait=true will only return after the deferred points become visible,
/// which may significantly increase the perceived latency between submitting an update and its
/// completion. Update requests with wait=false are not affected.
/// Default is disabled.
#[prost(bool, optional, tag = "10")]
pub prevent_unoptimized: ::core::option::Option<bool>,
Expand Down Expand Up @@ -898,6 +902,10 @@ pub struct StrictModeConfig {
/// Delete-style operations are still allowed so memory can be freed.
#[prost(uint32, optional, tag = "21")]
pub max_resident_memory_percent: ::core::option::Option<u32>,
/// Reject disk-consuming update operations when the filesystem hosting Qdrant storage exceeds this percentage of total capacity (1-100).
/// 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.
#[prost(uint32, optional, tag = "22")]
pub max_disk_usage_percent: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StrictModeSparseConfig {
Expand Down Expand Up @@ -1744,6 +1752,7 @@ pub enum Datatype {
Float32 = 1,
Uint8 = 2,
Float16 = 3,
Turbo4 = 4,
}
impl Datatype {
/// String value of the enum field names used in the ProtoBuf definition.
Expand All @@ -1756,6 +1765,7 @@ impl Datatype {
Self::Float32 => "Float32",
Self::Uint8 => "Uint8",
Self::Float16 => "Float16",
Self::Turbo4 => "Turbo4",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
Expand All @@ -1765,6 +1775,7 @@ impl Datatype {
"Float32" => Some(Self::Float32),
"Uint8" => Some(Self::Uint8),
"Float16" => Some(Self::Float16),
"Turbo4" => Some(Self::Turbo4),
_ => None,
}
}
Expand Down Expand Up @@ -4042,7 +4053,7 @@ pub struct DenseVectorCreationConfig {
/// Configuration for multi-vector search (e.g., ColBERT)
#[prost(message, optional, tag = "3")]
pub multivector_config: ::core::option::Option<MultiVectorConfig>,
/// Data type of the vectors (Float32, Float16, Uint8)
/// Data type of the vectors (Float32, Float16, Uint8, Turbo4)
#[prost(enumeration = "Datatype", optional, tag = "4")]
pub datatype: ::core::option::Option<i32>,
}
Expand Down
Loading