mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 22:32:55 +00:00
fix: fix non-physical error msg (#3087)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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 })?;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user