test: add tests for lease keeper with logical table (#3096)

This commit is contained in:
Weny Xu
2024-01-05 11:29:48 +09:00
committed by GitHub
parent 44ba131987
commit 342faa4e07
2 changed files with 45 additions and 3 deletions

View File

@@ -91,7 +91,9 @@ impl TableRouteValue {
Ok(self.physical_table_route().version)
}
/// Returns the corresponding [RegionRoute].
/// Returns the corresponding [RegionRoute], returns `None` if it's the specific region is not found.
///
/// Note: It throws an error if it's a logical table
pub fn region_route(&self, region_id: RegionId) -> Result<Option<RegionRoute>> {
ensure!(
self.is_physical(),