Skip to content

Commit 32e5d5b

Browse files
committed
Fixed bug introduced by PR
1 parent 96f0bb2 commit 32e5d5b

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

quickwit/quickwit-config/src/node_config/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl Default for IndexerConfig {
111111
}
112112

113113
#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)]
114+
#[serde(deny_unknown_fields)]
114115
pub struct SplitCacheLimits {
115116
pub max_num_bytes: Byte,
116117
#[serde(default = "SplitCacheLimits::default_max_num_splits")]

quickwit/quickwit-indexing/src/actors/uploader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ mod tests {
979979
uncompressed_docs_size_in_bytes: 1_000,
980980
num_docs: 10,
981981
replaced_split_ids: Vec::new(),
982-
split_id: "split_ulid_str".to_string(),
982+
split_id: SPLIT_ULID_STR.to_string(),
983983
delete_opstamp: 10,
984984
num_merge_ops: 0,
985985
},

quickwit/quickwit-search/src/search_job_placer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ impl EventSubscriber<ReportSplitsRequest> for SearchJobPlacer {
8080
// This actually never happens thanks to the if-condition at the
8181
// top of this function.
8282
.expect("`nodes` should not be empty.");
83-
splits_per_node.entry(*node_addr).or_default();
83+
splits_per_node
84+
.entry(*node_addr)
85+
.or_default()
86+
.push(report_split);
8487
}
8588
for (node_addr, report_splits) in splits_per_node {
8689
if let Some(search_client) = nodes.get_mut(&node_addr) {

quickwit/quickwit-storage/src/split_cache/download_task.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::time::Duration;
2424

2525
use quickwit_common::split_file;
2626
use tokio::sync::{OwnedSemaphorePermit, Semaphore};
27-
use tracing::error;
27+
use tracing::{error, instrument};
2828
use ulid::Ulid;
2929

3030
use crate::split_cache::split_table::{CandidateSplit, DownloadOpportunity, SplitTable};
@@ -35,6 +35,7 @@ use crate::StorageResolver;
3535
///
3636
/// At this point, the disk space is already accounted as released,
3737
/// so the error could result in a "disk space leak".
38+
#[instrument]
3839
async fn delete_evicted_splits(root_path: &Path, splits_to_delete: &[Ulid]) {
3940
for &split_to_delete in splits_to_delete {
4041
let split_file_path = root_path.join(split_to_delete.to_string());
@@ -65,7 +66,7 @@ async fn download_split(
6566
Ok(num_bytes)
6667
}
6768

68-
async fn perform_download(
69+
async fn perform_eviction_and_download(
6970
download_opportunity: DownloadOpportunity,
7071
root_path: PathBuf,
7172
storage_resolver: StorageResolver,
@@ -99,7 +100,7 @@ pub(crate) fn spawn_download_task(
99100
.unwrap()
100101
.find_download_opportunity();
101102
if let Some(download_opportunity) = download_opportunity_opt {
102-
tokio::task::spawn(perform_download(
103+
tokio::task::spawn(perform_eviction_and_download(
103104
download_opportunity,
104105
root_path.clone(),
105106
storage_resolver.clone(),

quickwit/quickwit-storage/src/split_cache/split_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl SplitTable {
340340
}
341341

342342
fn is_out_of_limits(&self) -> bool {
343-
if self.candidate_splits.is_empty() {
343+
if self.on_disk_splits.is_empty() {
344344
return false;
345345
}
346346
if self.on_disk_splits.len() + self.downloading_splits.len()

0 commit comments

Comments
 (0)