Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-21618] Ensure that the LoadStatistics return a self-co…
…nsistent result. The original method of computing load statistics would compute the total and idle counts independently which could lead to counting errors while jobs started in between the different state counting operations. This change switches to returning a `LoadStatisticsSnapshot` so that callers will get a single consistent view of the counts which was valid for at least one point in time during the collection of the snapshot.
- Loading branch information
Showing with 588 additions and 73 deletions.
- +11 −0 core/src/main/java/hudson/model/Label.java
- +402 −22 core/src/main/java/hudson/model/LoadStatistics.java
- +12 −1 core/src/main/java/hudson/model/OverallLoadStatistics.java
- +94 −46 core/src/main/java/hudson/slaves/NodeProvisioner.java
- +1 −2 core/src/main/java/jenkins/model/Jenkins.java
- +48 −0 core/src/main/java/jenkins/model/UnlabeledLoadStatistics.java
- +5 −0 core/src/main/resources/hudson/model/Messages.properties
- +15 −2 core/src/test/java/hudson/model/LoadStatisticsTest.java
Oops, something went wrong.