Skip to content

Commit

Permalink
fix for staging size metrics not resetting to 0 (#743)
Browse files Browse the repository at this point in the history
fix for staging size metrics not resetting to 0 even when 
local to storage sync is completed and no arrow/parquet 
file is left in staging folder
  • Loading branch information
nikhilsinhaparseable authored Apr 8, 2024
1 parent b73a3a9 commit be469a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/storage/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ pub fn convert_disk_files_to_parquet(
let staging_files = dir.arrow_files_grouped_exclude_time(time);
if staging_files.is_empty() {
metrics::STAGING_FILES.with_label_values(&[stream]).set(0);
metrics::STORAGE_SIZE
.with_label_values(&["staging", stream, "arrows"])
.set(0);
metrics::STORAGE_SIZE
.with_label_values(&["staging", stream, "parquet"])
.set(0);
}

for (parquet_path, files) in staging_files {
Expand Down

0 comments on commit be469a3

Please sign in to comment.