File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -72,18 +72,19 @@ impl HotTierManager {
72
72
pub fn global ( ) -> Option < & ' static HotTierManager > {
73
73
static INSTANCE : OnceCell < HotTierManager > = OnceCell :: new ( ) ;
74
74
75
- let hot_tier_path = & CONFIG . options . hot_tier_storage_path ;
76
- if hot_tier_path . is_none ( ) {
77
- return None ;
78
- }
79
- Some ( INSTANCE . get_or_init ( | | {
80
- let hot_tier_path = hot_tier_path . as_ref ( ) . unwrap ( ) . clone ( ) ;
75
+ CONFIG
76
+ . options
77
+ . hot_tier_storage_path
78
+ . clone ( )
79
+ . map ( |hot_tier_path | {
80
+ INSTANCE . get_or_init ( || {
81
81
std:: fs:: create_dir_all ( & hot_tier_path) . unwrap ( ) ;
82
82
HotTierManager {
83
83
filesystem : LocalFileSystem :: new ( ) ,
84
84
hot_tier_path,
85
85
}
86
- } ) )
86
+ } )
87
+ } )
87
88
}
88
89
89
90
///get the total hot tier size for all streams
You can’t perform that action at this time.
0 commit comments