Yicong-Huang opened a new issue, #4732: URL: https://github.com/apache/texera/issues/4732
### What happened? Calling `next()` on a deploy strategy whose `available` array is empty produces a different exception per strategy: - `OneOnEach`: `IndexOutOfBoundsException` - `RoundRobinDeployment`: `ArithmeticException` (divide-by-zero on `index = (index + 1) % length`) - `RandomDeployment`: `IllegalArgumentException` (`Random.nextInt(0)` rejects bound 0) The shared `DeployStrategy` trait gives no contract for the empty-array case, but a unified failure mode would make callers easier to write. ### How to reproduce? For each strategy, `init` with `Array.empty[Address]` and call `next()`: ```scala OneOnEach().tap(_.initialize(Array.empty)).next() // IndexOutOfBoundsException RoundRobinDeployment().tap(_.initialize(Array.empty)).next() // ArithmeticException RandomDeployment().tap(_.initialize(Array.empty)).next() // IllegalArgumentException ``` ### Version 1.1.0-incubating (Pre-release/Master) -- 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]
