@@ -213,13 +213,17 @@ impl HotTierManager {
213213 if !self . check_stream_hot_tier_exists ( stream, tenant_id) {
214214 return Err ( HotTierValidationError :: NotFound ( stream. to_owned ( ) ) . into ( ) ) ;
215215 }
216- let path = self . hot_tier_path . join ( stream) ;
216+ let path = if let Some ( tenant_id) = tenant_id. as_ref ( ) {
217+ self . hot_tier_path . join ( tenant_id) . join ( stream)
218+ } else {
219+ self . hot_tier_path . join ( stream)
220+ } ;
217221 fs:: remove_dir_all ( path) . await ?;
218222
219223 Ok ( ( ) )
220224 }
221225
222- ///put the hot tier metadata file for the stream
226+ /// put the hot tier metadata file for the stream
223227 /// set the updated_date_range in the hot tier metadata file
224228 pub async fn put_hot_tier (
225229 & self ,
@@ -239,10 +243,6 @@ impl HotTierManager {
239243 stream : & str ,
240244 tenant_id : & Option < String > ,
241245 ) -> Result < object_store:: path:: Path , HotTierError > {
242- // let path = self
243- // .hot_tier_path
244- // .join(stream)
245- // .join(STREAM_HOT_TIER_FILENAME);
246246 let path = if let Some ( tenant_id) = tenant_id. as_ref ( ) {
247247 self . hot_tier_path
248248 . join ( tenant_id)
@@ -258,7 +258,7 @@ impl HotTierManager {
258258 Ok ( path)
259259 }
260260
261- ///schedule the download of the hot tier files from S3 every minute
261+ /// schedule the download of the hot tier files from S3 every minute
262262 pub fn download_from_s3 < ' a > ( & ' a self ) -> Result < ( ) , HotTierError >
263263 where
264264 ' a : ' static ,
@@ -282,7 +282,7 @@ impl HotTierManager {
282282 Ok ( ( ) )
283283 }
284284
285- ///sync the hot tier files from S3 to the hot tier directory for all streams
285+ /// sync the hot tier files from S3 to the hot tier directory for all streams
286286 async fn sync_hot_tier ( & self ) -> Result < ( ) , HotTierError > {
287287 // Before syncing, check if pstats stream was created and needs hot tier
288288 if let Err ( e) = self . create_pstats_hot_tier ( ) . await {
0 commit comments