mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-10 15:22:56 +00:00
fix: only consider the datanode that reports the failure (#6004)
* fix: only consider the datanode that reports the failure * chore: fix clippy
This commit is contained in:
@@ -395,12 +395,15 @@ impl RegionSupervisor {
|
||||
.push(region_id);
|
||||
}
|
||||
|
||||
let failed_datanodes = grouped_regions.keys().cloned().collect::<Vec<_>>();
|
||||
for (datanode_id, regions) in grouped_regions {
|
||||
warn!(
|
||||
"Detects region failures on datanode: {}, regions: {:?}",
|
||||
datanode_id, regions
|
||||
);
|
||||
// We can't use `grouped_regions.keys().cloned().collect::<Vec<_>>()` here
|
||||
// because there may be false positives in failure detection on the datanode.
|
||||
// So we only consider the datanode that reports the failure.
|
||||
let failed_datanodes = [datanode_id];
|
||||
match self
|
||||
.generate_failover_tasks(datanode_id, ®ions, &failed_datanodes)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user