diff --git a/src/common/meta/src/key/table_route.rs b/src/common/meta/src/key/table_route.rs index 4d2ac35001f3..8f70db5cae57 100644 --- a/src/common/meta/src/key/table_route.rs +++ b/src/common/meta/src/key/table_route.rs @@ -66,7 +66,7 @@ impl TableRouteValue { ensure!( self.is_physical(), UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), } ); let version = self.physical_table_route().version; @@ -84,7 +84,7 @@ impl TableRouteValue { ensure!( self.is_physical(), UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), } ); Ok(self.physical_table_route().version) @@ -95,7 +95,7 @@ impl TableRouteValue { ensure!( self.is_physical(), UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), } ); Ok(self @@ -116,7 +116,7 @@ impl TableRouteValue { ensure!( self.is_physical(), UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), } ); Ok(&self.physical_table_route().region_routes) diff --git a/src/meta-srv/src/procedure/region_failover/update_metadata.rs b/src/meta-srv/src/procedure/region_failover/update_metadata.rs index 254ba3e8107d..bdc38df3d536 100644 --- a/src/meta-srv/src/procedure/region_failover/update_metadata.rs +++ b/src/meta-srv/src/procedure/region_failover/update_metadata.rs @@ -89,7 +89,7 @@ impl UpdateRegionMetadata { let mut new_region_routes = table_route_value .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), })? .clone(); diff --git a/src/meta-srv/src/procedure/region_migration/manager.rs b/src/meta-srv/src/procedure/region_migration/manager.rs index 3937d4e13905..3fc39ebf8569 100644 --- a/src/meta-srv/src/procedure/region_migration/manager.rs +++ b/src/meta-srv/src/procedure/region_migration/manager.rs @@ -256,7 +256,7 @@ impl RegionMigrationManager { let region_route = table_route .region_route(region_id) .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{table_route:?} is a non-physical TableRouteValue."), })? .context(error::RegionRouteNotFoundSnafu { region_id })?; diff --git a/src/meta-srv/src/procedure/region_migration/migration_start.rs b/src/meta-srv/src/procedure/region_migration/migration_start.rs index 6bacc92433aa..1a4d8349fd4a 100644 --- a/src/meta-srv/src/procedure/region_migration/migration_start.rs +++ b/src/meta-srv/src/procedure/region_migration/migration_start.rs @@ -86,7 +86,7 @@ impl RegionMigrationStart { let region_route = table_route .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), })? .iter() .find(|route| route.region.id == region_id) diff --git a/src/meta-srv/src/procedure/region_migration/update_metadata/upgrade_candidate_region.rs b/src/meta-srv/src/procedure/region_migration/update_metadata/upgrade_candidate_region.rs index 793efa4db66e..bff30bb4447a 100644 --- a/src/meta-srv/src/procedure/region_migration/update_metadata/upgrade_candidate_region.rs +++ b/src/meta-srv/src/procedure/region_migration/update_metadata/upgrade_candidate_region.rs @@ -33,7 +33,7 @@ impl UpdateMetadata { let mut region_routes = table_route_value .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), })? .clone(); let region_route = region_routes @@ -86,7 +86,7 @@ impl UpdateMetadata { let region_routes = table_route_value .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{self:?} is a non-physical TableRouteValue."), })? .clone(); let region_route = region_routes diff --git a/src/partition/src/manager.rs b/src/partition/src/manager.rs index 2963ac8e2b45..8e93fa0da238 100644 --- a/src/partition/src/manager.rs +++ b/src/partition/src/manager.rs @@ -79,7 +79,7 @@ impl PartitionRuleManager { route .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{route:?} is a non-physical TableRouteValue."), })?; Ok(RegionRoutes(region_routes.clone())) } @@ -96,7 +96,7 @@ impl PartitionRuleManager { route .region_routes() .context(error::UnexpectedLogicalRouteTableSnafu { - err_msg: "{self:?} is a non-physical TableRouteValue.", + err_msg: format!("{route:?} is a non-physical TableRouteValue."), })?; ensure!(