For calls to (*AutoscaleEnforcer).speculativeReserve(), the callback given to it returns a boolean which should indicate whether to actually reserve the Pod.
When handling Score, we were returning true (which we should never do in Score) exactly when the placement would have been over-budget. This meant that pods would be recorded on an over-full node early in the scheduling flow, disagreeing with the core scheduler, which causes even more calls to Score that we'd think are over-budget, exacerbating the problem.
For calls to
(*AutoscaleEnforcer).speculativeReserve()
, the callback given to it returns a boolean which should indicate whether to actually reserve the Pod.When handling Score, we were returning true (which we should never do in Score) exactly when the placement would have been over-budget. This meant that pods would be recorded on an over-full node early in the scheduling flow, disagreeing with the core scheduler, which causes even more calls to Score that we'd think are over-budget, exacerbating the problem.
ref https://neondb.slack.com/archives/C0798QG4D0T/p1719016313787749?thread_ts=1719014348.041469