diff --git a/fdbserver/DataDistribution.actor.cpp b/fdbserver/DataDistribution.actor.cpp index 689c4650f2..5a848b4714 100644 --- a/fdbserver/DataDistribution.actor.cpp +++ b/fdbserver/DataDistribution.actor.cpp @@ -1610,6 +1610,9 @@ struct DDTeamCollection : ReferenceCounted { uint32_t minTeamNumber = std::numeric_limits::max(); uint32_t maxTeamNumber = std::numeric_limits::min(); for (auto& server : server_info) { + if ( server_status.get(server.first).isUnhealthy() ) { + continue; + } if (server.second->teams.size() < minTeamNumber) { minTeamNumber = server.second->teams.size(); } @@ -1624,6 +1627,9 @@ struct DDTeamCollection : ReferenceCounted { uint32_t minTeamNumber = std::numeric_limits::max(); uint32_t maxTeamNumber = std::numeric_limits::min(); for (auto& machine : machine_info) { + if ( !isMachineHealthy(machine.second) ) { + continue; + } if (machine.second->machineTeams.size() < minTeamNumber) { minTeamNumber = machine.second->machineTeams.size(); }