Skip to content

Commit

Permalink
Fix preemption reason - fairshare preemption (#4045)
Browse files Browse the repository at this point in the history
We were incorrectly resetting the PreemptingJobId, which shouldn't get reset

The UnschedulableReason is only reset as we try scheduling the jobs several times, during these rounds the jobs we're scheduling cannot be preempted - so it makes no sense to reset their PreemptingJobId

This makes it so we now correct populate the preemption reason for fairshare preemption

Signed-off-by: JamesMurkin <[email protected]>
  • Loading branch information
JamesMurkin authored Nov 15, 2024
1 parent 43d53a5 commit b3b07b9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion internal/scheduler/nodedb/nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ func (nodeDb *NodeDb) ScheduleManyWithTxn(txn *memdb.Txn, gctx *context.GangSche
// order to find the best fit for this gang); clear out any remnants of
// previous attempts.
jctx.UnschedulableReason = ""
jctx.PreemptingJobId = ""

node, err := nodeDb.SelectNodeForJobWithTxn(txn, jctx)
if err != nil {
Expand Down

0 comments on commit b3b07b9

Please sign in to comment.