From 0d82d1f891c0d432ac8ca96f6f3d081191e51c8b Mon Sep 17 00:00:00 2001 From: Noah Held Date: Tue, 27 Jun 2023 21:27:39 +0100 Subject: [PATCH] Remove redundant assignment to `isSchedulable` --- internal/scheduler/submitcheck.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/scheduler/submitcheck.go b/internal/scheduler/submitcheck.go index 27f8485fd7e..c80d6a17c85 100644 --- a/internal/scheduler/submitcheck.go +++ b/internal/scheduler/submitcheck.go @@ -214,9 +214,10 @@ func (srv *SubmitChecker) getSchedulingResult(jctxs []*schedulercontext.JobSched nodeDb := executor.nodeDb txn := nodeDb.Txn(true) ok, err := nodeDb.ScheduleManyWithTxn(txn, jctxs) - isSchedulable = isSchedulable || ok txn.Abort() + isSchedulable = isSchedulable || ok + sb.WriteString(id) if err != nil { sb.WriteString(err.Error()) @@ -224,7 +225,6 @@ func (srv *SubmitChecker) getSchedulingResult(jctxs []*schedulercontext.JobSched continue } - isSchedulable = isSchedulable || ok numSuccessfullyScheduled := 0 for _, jctx := range jctxs { pctx := jctx.PodSchedulingContext