From 5421d0a180333d9a8acf9fdc3ceb39bc2bc9923c Mon Sep 17 00:00:00 2001 From: oyjhl Date: Sat, 28 Mar 2026 19:37:12 -0600 Subject: [PATCH 1/2] Update solrcloud_controller.go --- controllers/solrcloud_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/solrcloud_controller.go b/controllers/solrcloud_controller.go index b18dbd14..355d378a 100644 --- a/controllers/solrcloud_controller.go +++ b/controllers/solrcloud_controller.go @@ -680,7 +680,7 @@ func (r *SolrCloudReconciler) cleanupUnconfiguredServices(ctx context.Context, s return } for _, pod := range podList { - if pod.Annotations == nil && pod.Annotations[util.ServiceTypeAnnotation] != "" { + if pod.Annotations != nil && pod.Annotations[util.ServiceTypeAnnotation] != "" { if onlyServiceTypeInUse != pod.Annotations[util.ServiceTypeAnnotation] { // Only remove services if all pods are using the same, and configured, type of service. // Otherwise, we are in transition between service types and need to wait to delete anything. From 9cd08706b0a0d7d8538bf060a682d21ccc4c3778 Mon Sep 17 00:00:00 2001 From: oyjhl Date: Sat, 28 Mar 2026 19:38:31 -0600 Subject: [PATCH 2/2] Update solr_scale_util.go --- controllers/util/solr_scale_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/util/solr_scale_util.go b/controllers/util/solr_scale_util.go index 3f556af6..e10c6da4 100644 --- a/controllers/util/solr_scale_util.go +++ b/controllers/util/solr_scale_util.go @@ -35,7 +35,7 @@ import ( func BalanceReplicasForCluster(ctx context.Context, solrCloud *solr.SolrCloud, statefulSet *appsv1.StatefulSet, balanceReason string, balanceCmdUniqueId string, logger logr.Logger) (balanceComplete bool, requestInProgress bool, retryLaterDuration time.Duration, err error) { logger = logger.WithValues("balanceReason", balanceReason) // If the Cloud has 1 or zero pods, there is no reason to balance replicas. - if statefulSet.Spec.Replicas == nil || *statefulSet.Spec.Replicas < 1 { + if statefulSet.Spec.Replicas == nil || *statefulSet.Spec.Replicas <= 1 { balanceComplete = true } else { requestId := "balance-replicas-" + balanceCmdUniqueId