Skip to content
Draft
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
200 changes: 200 additions & 0 deletions quickwit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions quickwit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ dyn-clone = "1.0"
enum-iterator = "2.3"
env_logger = { version = "0.11", default-features = false, features = ["auto-color"] }
fail = "0.5"
foyer = { version = "0.22.3", features = ["serde"] }
flate2 = "1.1"
flume = "0.12"
fnv = "1"
Expand Down
28 changes: 28 additions & 0 deletions quickwit/quickwit-config/src/node_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,15 @@ pub struct SearcherConfig {
{ByteSize::mb(256).as_u64()}>")]
pub predicate_cache: CacheConfig,

/// Cache for term dictionaries (.term files). Disabled (0) by default.
#[serde(alias = "term_dict_cache_capacity")]
#[serde(deserialize_with = "CacheConfig::deserialize_with_default::<_, 0>")]
pub term_dict_cache: CacheConfig,
/// Cache for posting lists (.idx files). Disabled (0) by default.
#[serde(alias = "posting_list_cache_capacity")]
#[serde(deserialize_with = "CacheConfig::deserialize_with_default::<_, 0>")]
pub posting_list_cache: CacheConfig,

pub max_num_concurrent_split_searches: usize,
pub max_splits_per_search: Option<usize>,
// Deprecated: stream search requests are no longer supported.
Expand All @@ -302,6 +311,17 @@ pub struct SearcherConfig {
pub storage_timeout_policy: Option<StorageTimeoutPolicy>,
pub warmup_memory_budget: ByteSize,
pub warmup_single_split_initial_allocation: ByteSize,
/// Enable the disk tier for the partial request cache.
/// When enabled, evicted entries from the in-memory partial request cache
/// spill to `{data_dir}/partial-request-cache/` (NVMe recommended) instead
/// of being lost. Disabled by default.
#[serde(default)]
pub partial_request_disk_cache_enabled: bool,
/// Disk cache capacity for the partial request cache (default: 1 GB).
/// Ignored if partial_request_disk_cache_enabled is false.
#[serde(default = "SearcherConfig::default_partial_request_disk_cache_capacity")]
pub partial_request_disk_cache_capacity: ByteSize,

/// Lambda configuration for serverless leaf search execution.
/// If set, enables Lambda execution for leaf search.
///
Expand Down Expand Up @@ -514,6 +534,8 @@ impl Default for SearcherConfig {
split_footer_cache: CacheConfig::default_with_capacity(ByteSize::mb(500)),
partial_request_cache: CacheConfig::default_with_capacity(ByteSize::mb(64)),
predicate_cache: CacheConfig::default_with_capacity(ByteSize::mb(256)),
term_dict_cache: CacheConfig::default_with_capacity(ByteSize(0)),
posting_list_cache: CacheConfig::default_with_capacity(ByteSize(0)),
max_num_concurrent_split_searches: 100,
max_splits_per_search: None,
_max_num_concurrent_split_streams: None,
Expand All @@ -525,12 +547,18 @@ impl Default for SearcherConfig {
storage_timeout_policy: None,
warmup_memory_budget: ByteSize::gb(100),
warmup_single_split_initial_allocation: ByteSize::mb(300),
partial_request_disk_cache_enabled: false,
partial_request_disk_cache_capacity: Self::default_partial_request_disk_cache_capacity(),
lambda: None,
}
}
}

impl SearcherConfig {
fn default_partial_request_disk_cache_capacity() -> ByteSize {
ByteSize::gb(1)
}

/// The timeout applied at the gRPC layer for search requests
pub fn request_timeout(&self) -> Duration {
Duration::from_secs(self.request_timeout_secs.get())
Expand Down
1 change: 1 addition & 0 deletions quickwit/quickwit-search/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ base64 = { workspace = true }
bytes = { workspace = true }
bytesize = { workspace = true }
fnv = { workspace = true }
foyer = { workspace = true }
futures = { workspace = true }
http = { workspace = true }
itertools = { workspace = true }
Expand Down
Loading
Loading