From 973a554808754baaa8bc7b4d7667c6bbe039a17e Mon Sep 17 00:00:00 2001 From: Piotr Kazmierczak <470696+pkazmierczak@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:06:52 +0200 Subject: [PATCH] scheduler: remove unnecessary reconnecting and ignore allocset assignment (#26298) These values aren't used anywhere, and the code is confusing as is. --- scheduler/reconciler/reconcile_cluster.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scheduler/reconciler/reconcile_cluster.go b/scheduler/reconciler/reconcile_cluster.go index f9f5ef404..9a1f1bd7f 100644 --- a/scheduler/reconciler/reconcile_cluster.go +++ b/scheduler/reconciler/reconcile_cluster.go @@ -482,16 +482,14 @@ func (a *AllocReconciler) computeGroup(group string, all allocSet) (*ReconcileRe reconnect, stopAllocSet, stopAllocResult := a.reconcileReconnecting(reconnecting, all, tg) result.Stop = append(result.Stop, stopAllocResult...) - // Stop the reconciled allocations and remove them from the other sets - // since they have been already handled. + // Stop the reconciled allocations and remove them from untainted, migrate, lost + // and disconnecting sets, since they have been already handled. result.DesiredTGUpdates[group].Stop += uint64(len(stopAllocSet)) untainted = untainted.difference(stopAllocSet) migrate = migrate.difference(stopAllocSet) lost = lost.difference(stopAllocSet) disconnecting = disconnecting.difference(stopAllocSet) - reconnecting = reconnecting.difference(stopAllocSet) - ignore = ignore.difference(stopAllocSet) // Validate and add reconnecting allocations to the plan so they are // logged.