diff --git a/src/meta-srv/src/procedure/region_migration/update_metadata/downgrade_leader_region.rs b/src/meta-srv/src/procedure/region_migration/update_metadata/downgrade_leader_region.rs index 818aadd9cda6..f764a424e864 100644 --- a/src/meta-srv/src/procedure/region_migration/update_metadata/downgrade_leader_region.rs +++ b/src/meta-srv/src/procedure/region_migration/update_metadata/downgrade_leader_region.rs @@ -60,13 +60,13 @@ impl UpdateMetadata { .await .context(error::TableMetadataManagerSnafu) { - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); return error::RetryLaterSnafu { reason: format!("Failed to update the table route during the downgrading leader region, error: {err}") }.fail(); } - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); Ok(()) } diff --git a/src/meta-srv/src/procedure/region_migration/update_metadata/rollback_downgraded_region.rs b/src/meta-srv/src/procedure/region_migration/update_metadata/rollback_downgraded_region.rs index 844188f2f1f9..6d066a1b863f 100644 --- a/src/meta-srv/src/procedure/region_migration/update_metadata/rollback_downgraded_region.rs +++ b/src/meta-srv/src/procedure/region_migration/update_metadata/rollback_downgraded_region.rs @@ -44,13 +44,13 @@ impl UpdateMetadata { .await .context(error::TableMetadataManagerSnafu) { - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); return error::RetryLaterSnafu { reason: format!("Failed to update the table route during the rollback downgraded leader region, error: {err}") }.fail(); } - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); Ok(()) } 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 98d706abec12..e69d0cd714e1 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 @@ -167,13 +167,13 @@ impl UpdateMetadata { .await .context(error::TableMetadataManagerSnafu) { - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); return error::RetryLaterSnafu { reason: format!("Failed to update the table route during the upgrading candidate region, error: {err}") }.fail(); }; - debug_assert!(ctx.remove_table_route_value()); + ctx.remove_table_route_value(); // Consumes the guard. ctx.volatile_ctx.opening_region_guard.take();