You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a warmup method is run, but no warmups to run were found it should not do anything.
Actual Behavior
When a warmup method is run, but no warmups to run were found SimpleDequePool picks mergeConcurrency as lowest number of configured warmupParallelism and length of found warmups. Found warmups is 0, thus this values is passed further to Flux.merge and results in error from FluxFlatMap. java.lang.IllegalArgumentException: maxConcurrency > 0 required but it was 0
Steps to Reproduce
We have configured scheduled warmup with our custom find out idle timeout that caused pool to increase our response time. Thus we are running warmup once per X second, but it's not always needed as in high traffic this just simply should be ignored. First run after app starts is fine as then maxConcurrency is 1, but later it's mostly 0 and we just have constant errors.
Possible Solution
Add check before executing warmups if there is anything to run to avoid unnecessary call for warmup with invalid configuration.
Your Environment
Spring Boot 3 App with Netty server and reactor-pool 1.0.3.
Reactor version(s) used: 1.0.3
Other relevant libraries versions (eg. netty, ...): netty, Spring Boot 3
JVM version (java -version): 17
The text was updated successfully, but these errors were encountered:
Looking at branch 0.1.x seems it might be resolved, but I can't update reactor-pool to higher version to confirm that (parent library limitation). At this moment we are catching and ignoring this exception.
thanks for reporting, this is a regression from #171, only for 1.0.x branch, originating from 1.0.1 version.
There is this ongoing PR which is addressing the problem: #181
…le (#181)
This fixes a regression that comes from #171, from 1.0.1 version: since the pool warmup method allows to be called at anytime, then if no more permits are available from the allocation strategy, the Flux.merge method is then called with a mergeConcurrencypameter that is set to 0, causing the following exception:
maxConcurrency > 0 required but it was 0
java.lang.IllegalArgumentException: maxConcurrency > 0 required but it was 0
at reactor.core.publisher.FluxFlatMap.<init>(FluxFlatMap.java:74)
at reactor.core.publisher.Flux.merge(Flux.java:1406)
at reactor.core.publisher.Flux.merge(Flux.java:1375)
Added a check in warmup to immediately return in case no permits are available.
Also added a test case.
Fixes#180
Expected Behavior
When a warmup method is run, but no warmups to run were found it should not do anything.
Actual Behavior
When a warmup method is run, but no warmups to run were found SimpleDequePool picks mergeConcurrency as lowest number of configured warmupParallelism and length of found warmups. Found warmups is 0, thus this values is passed further to Flux.merge and results in error from FluxFlatMap.
java.lang.IllegalArgumentException: maxConcurrency > 0 required but it was 0
Steps to Reproduce
We have configured scheduled warmup with our custom find out idle timeout that caused pool to increase our response time. Thus we are running warmup once per X second, but it's not always needed as in high traffic this just simply should be ignored. First run after app starts is fine as then maxConcurrency is 1, but later it's mostly 0 and we just have constant errors.
Possible Solution
Add check before executing warmups if there is anything to run to avoid unnecessary call for warmup with invalid configuration.
Your Environment
Spring Boot 3 App with Netty server and reactor-pool 1.0.3.
netty
, ...): netty, Spring Boot 3java -version
): 17The text was updated successfully, but these errors were encountered: