Skip to content

AbstractPersistStateMachineHandler fails to handle event in webflux #949

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

Closed
xJoeWoo opened this issue Apr 16, 2021 · 2 comments
Closed

AbstractPersistStateMachineHandler fails to handle event in webflux #949

xJoeWoo opened this issue Apr 16, 2021 · 2 comments
Labels
branch/3.0.x Issue for a branch for/backport For backporting type/bug Is a bug report
Milestone

Comments

@xJoeWoo
Copy link
Contributor

xJoeWoo commented Apr 16, 2021

java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-epoll-1
	at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:83)
	at reactor.core.publisher.Mono.block(Mono.java:1703)
	at org.springframework.statemachine.support.AbstractStateMachine.resetStateMachine(AbstractStateMachine.java:719)
	at org.springframework.statemachine.recipes.persist.AbstractPersistStateMachineHandler.lambda$handleEventWithStateReactively$0(AbstractPersistStateMachineHandler.java:86)

The exception caused due to resetStateMachine is not reactively called in a reactive chain.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Apr 16, 2021
xJoeWoo added a commit to xJoeWoo/spring-statemachine that referenced this issue Apr 16, 2021
…bstractPersistStateMachineHandler#handleEventWithStateReactively. Fix spring-projects#949

Signed-off-by: xJoeWoo <xjoewoo@gmail.com>
@jvalkeal
Copy link
Contributor

Good catch, somehow blockhound didn't catch this or we've relaxed too much in it as there's still tests to block.

@jvalkeal jvalkeal added this to the 3.1.0-M2 milestone Apr 25, 2021
@jvalkeal jvalkeal added type/bug Is a bug report branch/3.0.x Issue for a branch for/backport For backporting and removed status/need-triage Team needs to triage and take a first look labels Apr 25, 2021
jvalkeal pushed a commit that referenced this issue Apr 25, 2021
- improve AbstractPersistStateMachineHandler#handleEventWithStateReactively
- Fixex #949

Signed-off-by: xJoeWoo <xjoewoo@gmail.com>
@jvalkeal
Copy link
Contributor

Merged per 048e930

jvalkeal pushed a commit that referenced this issue Jun 27, 2021
- improve AbstractPersistStateMachineHandler#handleEventWithStateReactively
- Backport #949
- Fixess #956

Signed-off-by: xJoeWoo <xjoewoo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/3.0.x Issue for a branch for/backport For backporting type/bug Is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants