Skip to content

Commit

Permalink
fix for invalid parquet (#849)
Browse files Browse the repository at this point in the history
delete invalid parquets where file size is less than 
the length of the parquet footer

Fixes: #848
  • Loading branch information
nikhilsinhaparseable authored Jul 16, 2024
1 parent 2b09db6 commit 16bf9b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/storage/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ pub fn convert_disk_files_to_parquet(
}

writer.close()?;
if parquet_file.metadata().unwrap().len() == 0 {
if parquet_file.metadata().unwrap().len() < parquet::file::FOOTER_SIZE as u64 {
log::error!(
"Invalid parquet file {:?} detected for stream {}, removing it",
&parquet_path,
Expand Down

0 comments on commit 16bf9b3

Please sign in to comment.