From 8025b15d2cca6a1ff54f67db7e75e2894631c7b0 Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Sun, 1 Mar 2026 14:42:46 +1100 Subject: [PATCH] fix hot tier path --- src/hottier.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/hottier.rs b/src/hottier.rs index 35e5a6cdd..dec846a92 100644 --- a/src/hottier.rs +++ b/src/hottier.rs @@ -594,12 +594,17 @@ impl HotTierManager { ///check if the hot tier metadata file exists for the stream pub fn check_stream_hot_tier_exists(&self, stream: &str, tenant_id: &Option) -> bool { - // let path = self - // .hot_tier_path - // .join(stream) - // .join(STREAM_HOT_TIER_FILENAME); - let path = self.hot_tier_file_path(stream, tenant_id).unwrap(); - PathBuf::from(path.to_string()).exists() + let path = if let Some(tenant_id) = tenant_id.as_ref() { + self.hot_tier_path + .join(tenant_id) + .join(stream) + .join(STREAM_HOT_TIER_FILENAME) + } else { + self.hot_tier_path + .join(stream) + .join(STREAM_HOT_TIER_FILENAME) + }; + path.exists() } ///delete the parquet file from the hot tier directory for the stream