Skip to content

Commit

Permalink
Restore sort on HotCache file list
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Dec 5, 2024
1 parent 56362da commit 33f5b9a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quickwit/quickwit-directories/src/hot_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();
entries.sort_by_key(|el| el.0.to_owned());
entries
}
}

Expand Down

0 comments on commit 33f5b9a

Please sign in to comment.