Skip to content

Commit be469a3

Browse files
fix for staging size metrics not resetting to 0 (#743)
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
1 parent b73a3a9 commit be469a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/src/storage/staging.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ pub fn convert_disk_files_to_parquet(
199199
let staging_files = dir.arrow_files_grouped_exclude_time(time);
200200
if staging_files.is_empty() {
201201
metrics::STAGING_FILES.with_label_values(&[stream]).set(0);
202+
metrics::STORAGE_SIZE
203+
.with_label_values(&["staging", stream, "arrows"])
204+
.set(0);
205+
metrics::STORAGE_SIZE
206+
.with_label_values(&["staging", stream, "parquet"])
207+
.set(0);
202208
}
203209

204210
for (parquet_path, files) in staging_files {

0 commit comments

Comments
 (0)