Adalennis opened a new issue, #9278: URL: https://github.com/apache/hop/issues/9278
### Apache Hop version? 2.20.0 ### Java version? Java 21 ### Operating system macOS ### What happened? `RemoteHopServer.getDelay` adds a random extra wait with `RANDOM.nextInt((int) Math.min(Integer.MAX_VALUE, current / 4L))`. When `HOP_SERVER_RETRY_BACKOFF_INCREMENTS` is below 4, `current / 4` is 0, and `nextInt(0)` throws `IllegalArgumentException: bound must be positive`. `getDelay` is called inside the `catch` of the retry loop in `execService(variables, service, true)`. So the exception replaces the error of the failed request, and no retry is made. To reproduce, I called `RemoteHopServer.requestPipelineStatus` against a fake HTTP server that answers every request with 500 and counts the requests: | `HOP_SERVER_RETRIES` / `HOP_SERVER_RETRY_BACKOFF_INCREMENTS` | Requests | Result | |---|---|---| | 0 / 1000 | 1 | `HopException` (the server error) | | 2 / 1000 | 3 | `HopException`, after about 2.4 s | | 2 / 4 | 3 | `HopException` | | 2 / 1 | 1 | `IllegalArgumentException: bound must be positive` | | 2 / 0 | 1 | `IllegalArgumentException: bound must be positive` | ### Issue Priority Priority: 3 ### Issue Component Component: Hop Server -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
