From 6d0c94dbdb7b1bd7c157eb2802b820eb2f6c6a2e Mon Sep 17 00:00:00 2001 From: Dai Ha Date: Sat, 15 Aug 2026 16:02:35 +0200 Subject: [PATCH] Correct enforceMaxLoad's comment after CB-585 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../dev/ltms/bridged/member/CompositePeerLauncher.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bridged/src/main/java/dev/ltms/bridged/member/CompositePeerLauncher.java b/bridged/src/main/java/dev/ltms/bridged/member/CompositePeerLauncher.java index 3262766..d16686c 100644 --- a/bridged/src/main/java/dev/ltms/bridged/member/CompositePeerLauncher.java +++ b/bridged/src/main/java/dev/ltms/bridged/member/CompositePeerLauncher.java @@ -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) {