From 62e79a60dda65ed2241b37959865cd17a050b4d7 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 3 Jan 2024 05:33:19 +0000 Subject: [PATCH] feat: add logs for update metadata --- .../update_metadata/upgrade_candidate_region.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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..3bec7b7053e0 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 @@ -13,7 +13,7 @@ // limitations under the License. use common_meta::key::datanode_table::RegionInfo; -use common_meta::rpc::router::RegionRoute; +use common_meta::rpc::router::{region_distribution, RegionRoute}; use common_telemetry::{info, warn}; use snafu::{ensure, OptionExt, ResultExt}; @@ -144,6 +144,12 @@ impl UpdateMetadata { } = datanode_table_value.region_info.clone(); let table_route_value = ctx.get_table_route_value().await?; + let region_distribution = + region_distribution(®ion_routes).context(error::TableMetadataManagerSnafu)?; + info!( + "Trying to update region routes to {region_distribution:?} for table: {}", + region_id.table_id() + ); if let Err(err) = table_metadata_manager .update_table_route( region_id.table_id(),