Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warmup throws IllegalArgumentException in case no permits are available #181

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

pderop
Copy link
Contributor

@pderop pderop commented Dec 21, 2023

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

@pderop pderop added type/bug A general bug warn/regression A regression from a previous release labels Dec 21, 2023
@pderop pderop added this to the 1.0.5 milestone Dec 21, 2023
@pderop pderop self-assigned this Dec 21, 2023
@pderop pderop removed the warn/regression A regression from a previous release label Dec 21, 2023
@pderop pderop requested a review from a team December 21, 2023 14:13
@pderop
Copy link
Contributor Author

pderop commented Dec 21, 2023

@reactor/core-team , can you please have a look ?

@pderop
Copy link
Contributor Author

pderop commented Jan 4, 2024

@chemicL, thank you for the review.

@pderop pderop merged commit 3dae6b7 into reactor:main Jan 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warmup procedure fails if warmups were found
2 participants