Skip to content

fix(ndb): correct disruptionsAllowed calculation in NodeDisruptionBudget#82

Merged
damsallem merged 1 commit intocriteo:mainfrom
jmbass:fix/ndb-disruptions-allowed-formula
Mar 4, 2026
Merged

fix(ndb): correct disruptionsAllowed calculation in NodeDisruptionBudget#82
damsallem merged 1 commit intocriteo:mainfrom
jmbass:fix/ndb-disruptions-allowed-formula

Conversation

@jmbass
Copy link
Contributor

@jmbass jmbass commented Mar 3, 2026

Stop subtracting currentDisruptions twice when computing NodeDisruptionBudget.status.disruptionsAllowed. This was producing negative values at capacity (e.g. max=1, current=1 -> -1).

Add unit tests for boundary and limiting-factor cases to prevent regressions.

Stop subtracting `currentDisruptions` twice when computing `NodeDisruptionBudget.status.disruptionsAllowed`. This was producing negative values at capacity (e.g. `max=1, current=1 -> -1`).

Add unit tests for boundary and limiting-factor cases to prevent regressions.
@damsallem damsallem merged commit 3c468af into criteo:main Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants