From 33f5b9a346ce3a702f33e74957b96a38818b8651 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Thu, 5 Dec 2024 10:40:15 +0100 Subject: [PATCH] Restore sort on HotCache file list --- quickwit/quickwit-directories/src/hot_directory.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickwit/quickwit-directories/src/hot_directory.rs b/quickwit/quickwit-directories/src/hot_directory.rs index abb0f6c30bb..89db266d661 100644 --- a/quickwit/quickwit-directories/src/hot_directory.rs +++ b/quickwit/quickwit-directories/src/hot_directory.rs @@ -362,12 +362,15 @@ impl HotDirectory { } /// Get all the directory files and their sizes. pub fn get_file_sizes(&self) -> Vec<(PathBuf, u64)> { - self.inner + let mut entries = self + .inner .cache .file_lengths .iter() .map(|(k, v)| (k.clone(), *v)) - .collect() + .collect::>(); + entries.sort_by_key(|el| el.0.to_owned()); + entries } }