when calculating what nodes can process a shard allow UNKNOWN state

we have an issue where nodes get into UNKNOWN state rather frequently
during periods of high load when they aren't actually down. We want to
allow queries in this situation rather than giving a "shard
unavailable" message.
This commit is contained in:
Matthew Jaffee 2022-04-28 12:27:33 -05:00 committed by Matthew Jaffee
parent dee46d4423
commit 02663d0282

View file

@ -5707,7 +5707,7 @@ loop:
// If the node being considered is in any state other than STARTED,
// then exclude it from the map. This way, one of that node's
// healthy replicas will be included instead.
if topology.Nodes(nodes).ContainsID(node.ID) && node.State == disco.NodeStateStarted {
if topology.Nodes(nodes).ContainsID(node.ID) && (node.State == disco.NodeStateStarted || node.State == disco.NodeStateUnknown) {
m[node] = append(m[node], shard)
continue loop
}