mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 01:02:55 +00:00
fix: save code in debug_assert! (#3137)
fix: save code in debug_assert!
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user