janhoy commented on code in PR #930:
URL: https://github.com/apache/solr-operator/pull/930#discussion_r4801420954
##########
controllers/util/solr_update_util.go:
##########
@@ -280,6 +288,16 @@ func pickPodsToUpdate(cloud *solr.SolrCloud, outOfDatePods
OutOfDatePodSegmentat
isSafeToUpdate = false
break
}
+
+ // PULL replicas cannot become
leader, so keep at least one leader-eligible (NRT/TLOG) replica active, if the
shard has more than one.
+ activeLeaderEligibleCount :=
nodeContent.activeLeaderEligibleReplicasPerShard[shard]
+ notActiveLeaderEligibleCount :=
state.ShardLeaderEligibleReplicasNotActive[shard]
+ if
!allShardReplicasMayBeUnavailable && activeLeaderEligibleCount > 0 &&
notActiveLeaderEligibleCount > 0 &&
+
notActiveLeaderEligibleCount+activeLeaderEligibleCount >=
state.TotalShardLeaderEligibleReplicas[shard] {
Review Comment:
🤖 Intended: a pod hosting all NRT/TLOG replicas of a shard has to restart at
some point, so it is exempt. Made the exception explicit in 1fcc58c, with a
regression test and a doc note.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]