1 parent ff556fa commit f3c388cCopy full SHA for f3c388c
1 file changed
internal/app/switchover.go
@@ -17,9 +17,10 @@ const (
17
18
func (app *App) countAliveHAReplicasWithinNodes(nodes []string, shardState map[string]*HostState) int {
19
cnt := 0
20
+ noData := app.noDataInShard(shardState)
21
for _, hostname := range nodes {
22
state, ok := shardState[hostname]
- if ok && state.PingOk && state.PingStable && state.ReplicaState != nil && !app.lacksData(state) {
23
+ if ok && state.PingOk && state.PingStable && state.ReplicaState != nil && (!app.lacksData(state) || noData) {
24
cnt++
25
}
26
0 commit comments