mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 13:52:59 +00:00
fix: prevent failover of regions to the same peer (#5632)
This commit is contained in:
@@ -416,6 +416,12 @@ impl RegionSupervisor {
|
||||
)
|
||||
.await?;
|
||||
let to_peer = peers.remove(0);
|
||||
if to_peer.id == from_peer.id {
|
||||
warn!(
|
||||
"Skip failover for region: {region_id}, from_peer: {from_peer}, trying to failover to the same peer."
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
let task = RegionMigrationProcedureTask {
|
||||
cluster_id,
|
||||
region_id,
|
||||
|
||||
Reference in New Issue
Block a user