pub fn get_storage_path(region_dir: &str, region_id: RegionId) -> Option<String>
Expand description
get_storage_path returns the storage path from the region_dir.
It will always return the storage path if the region_dir is valid, otherwise None.
The storage path is constructed from the catalog and schema, which are generated by common_meta::ddl::utils::region_storage_path
.
We can extract the catalog and schema from the region_dir by following example:
use common_meta::ddl::utils::get_catalog_and_schema;
fn catalog_and_schema(region_dir: &str, region_id: RegionId) -> Option<(String, String)> {
get_catalog_and_schema(&get_storage_path(region_dir, region_id)?)
}