Commit 078eb22
committed
[server] Clamp step-down stamp ack timeout to non-negative at config-read time
Addresses Copilot review comment: a misconfigured negative ack-timeout would
make CompletableFuture.get(long, TimeUnit) return immediately or, on some
JDKs,
throw IllegalArgumentException - neither is what we want in the demotion
handler. Clamp the value to Math.max(0, raw) at config-read time so the
emit path can call get() unconditionally without a defensive guard at every
call site. Zero still works (no-wait poll), which is the operator's choice.
Testing Done
- testVeniceWriterInProcessConsumerAction passes (3.1 s).
- No behavior change for the default 1000 ms value.1 parent 8a6f7bc commit 078eb22
1 file changed
Lines changed: 9 additions & 1 deletion
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1285 | 1293 | | |
1286 | | - | |
| 1294 | + | |
1287 | 1295 | | |
1288 | 1296 | | |
1289 | 1297 | | |
| |||
0 commit comments