From d1e43fc91d73cd86a5ce3723d09c573e9b8bfa52 Mon Sep 17 00:00:00 2001 From: luofucong Date: Tue, 19 Dec 2023 11:39:38 +0800 Subject: [PATCH] fix: resolve PR comments --- src/common/meta/src/key/table_route.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/meta/src/key/table_route.rs b/src/common/meta/src/key/table_route.rs index eb79495ca1b4..13f8a756d13e 100644 --- a/src/common/meta/src/key/table_route.rs +++ b/src/common/meta/src/key/table_route.rs @@ -40,6 +40,7 @@ impl TableRouteKey { #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] pub enum TableRouteValue { Mito(MitoTableRouteValue), + File(FileTableRouteValue), Metrics(MetricsTableRouteValue), } @@ -49,6 +50,10 @@ pub struct MitoTableRouteValue { version: u64, } +// TODO(LFC): Make file engine table use its own table route. +#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] +pub struct FileTableRouteValue; + #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] pub struct MetricsTableRouteValue { // TODO(LFC): Add table route for MetricsEngine table. @@ -88,6 +93,10 @@ impl TableRouteValue { .cloned() } + /// Gets the [RegionRoute]s of this table route. + /// + /// # Panics + /// The engine type of this table is not "`Mito`". pub fn region_routes(&self) -> &Vec { &self.mito_table_route().region_routes }