Skip to content

Commit b2fae6f

Browse files
fix hot tier path (#1562)
1 parent 0ca4cfd commit b2fae6f

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

src/hottier.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,17 @@ impl HotTierManager {
594594

595595
///check if the hot tier metadata file exists for the stream
596596
pub fn check_stream_hot_tier_exists(&self, stream: &str, tenant_id: &Option<String>) -> bool {
597-
// let path = self
598-
// .hot_tier_path
599-
// .join(stream)
600-
// .join(STREAM_HOT_TIER_FILENAME);
601-
let path = self.hot_tier_file_path(stream, tenant_id).unwrap();
602-
PathBuf::from(path.to_string()).exists()
597+
let path = if let Some(tenant_id) = tenant_id.as_ref() {
598+
self.hot_tier_path
599+
.join(tenant_id)
600+
.join(stream)
601+
.join(STREAM_HOT_TIER_FILENAME)
602+
} else {
603+
self.hot_tier_path
604+
.join(stream)
605+
.join(STREAM_HOT_TIER_FILENAME)
606+
};
607+
path.exists()
603608
}
604609

605610
///delete the parquet file from the hot tier directory for the stream

0 commit comments

Comments
 (0)