Correct enforceMaxLoad's comment after CB-585
The comment said non-positive means unlimited at load. That stopped being true when CB-585 made an explicit maxLoad: 0 survive as a real cap of zero and made a negative value refuse config load. The code below it was already right — only the comment described the old normalisation. Flagged by the CB-585 worker, which correctly stayed out of a file not on its list.
This commit is contained in:
@@ -372,8 +372,11 @@ public final class CompositePeerLauncher implements PeerLauncher {
|
||||
}
|
||||
|
||||
private void enforceMaxLoad(String profile) {
|
||||
// Absent config, or a config whose maxLoad normalized to null (non-positive ⇒ unlimited at
|
||||
// load), means no cap — never cap what wasn't configured.
|
||||
// Absent config, or a config whose maxLoad normalized to null (ABSENT ⇒ unlimited at load),
|
||||
// means no cap — never cap what wasn't configured. Note "non-positive ⇒ unlimited" was true
|
||||
// until CB-585: an explicit `maxLoad: 0` now survives as 0 and is a real cap of zero, so the
|
||||
// check below refuses every spawn on that profile, and a negative value is refused at config
|
||||
// load rather than normalized away.
|
||||
BridgedConfig.Profile cfg = profiles0().get(profile);
|
||||
Integer cap = (cfg == null) ? null : cfg.maxLoad();
|
||||
if (cap == null) {
|
||||
|
||||
Reference in New Issue
Block a user