From 442209ae20a3b47ab576d4aa931327fa54e38599 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 21 Sep 2023 14:59:05 +0800 Subject: [PATCH 1/2] fix: add slash after generated region_dir Signed-off-by: Ruihang Xia --- src/store-api/src/path_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store-api/src/path_utils.rs b/src/store-api/src/path_utils.rs index 59dd640024a4..77050daf0e2e 100644 --- a/src/store-api/src/path_utils.rs +++ b/src/store-api/src/path_utils.rs @@ -45,7 +45,7 @@ pub fn table_dir(path: &str, table_id: TableId) -> String { pub fn region_dir(path: &str, region_id: RegionId) -> String { format!( - "{}{}", + "{}{}/", table_dir(path, region_id.table_id()), region_name(region_id.table_id(), region_id.region_number()) ) From bb5123be9f3fac0109f3456b50483479e5cf1832 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Thu, 21 Sep 2023 15:13:43 +0800 Subject: [PATCH 2/2] update ut Signed-off-by: Ruihang Xia --- src/store-api/src/path_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store-api/src/path_utils.rs b/src/store-api/src/path_utils.rs index 77050daf0e2e..82d55c588d0e 100644 --- a/src/store-api/src/path_utils.rs +++ b/src/store-api/src/path_utils.rs @@ -60,7 +60,7 @@ mod tests { let region_id = RegionId::new(42, 1); assert_eq!( region_dir("my_catalog/my_schema", region_id), - "data/my_catalog/my_schema/42/42_0000000001" + "data/my_catalog/my_schema/42/42_0000000001/" ); } }