Skip to content
Merged
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
9 changes: 8 additions & 1 deletion server/src/hottier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ impl HotTierManager {
.get_stream_hot_tier_manifest_for_date(stream, &date)
.await?;
hot_tier_manifest.files.push(parquet_file.clone());
hot_tier_manifest
.files
.sort_by_key(|file| file.file_path.clone());
// write the manifest file to the hot tier directory
let manifest_path = self
.hot_tier_path
Expand Down Expand Up @@ -501,14 +504,18 @@ impl HotTierManager {
.iter()
.any(|manifest_file| manifest_file.file_path.eq(&file.file_path))
});
let remaining_files: Vec<File> = manifest_files
hot_tier_files.sort_unstable_by(|a, b| b.file_path.cmp(&a.file_path));

let mut remaining_files: Vec<File> = manifest_files
.into_iter()
.filter(|manifest_file| {
hot_tier_files
.iter()
.all(|file| !file.file_path.eq(&manifest_file.file_path))
})
.collect();
remaining_files.sort_unstable_by(|a, b| b.file_path.cmp(&a.file_path));

Ok((hot_tier_files, remaining_files))
}

Expand Down