-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Milestone
Description
haicoder opened DATAREDIS-999 and commented
When I use ReactiveRedisTemplate in my spring boot application, I always get this error below:
2019/06/18 23:05:54.205 [b43b485d-7249-4ccb-ac23-ae954638ab4e] [parallel-2] [ERROR] reactor.core.publisher.Operators - Operator called default onErrorDropped
java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread parallel-2
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:77)
at reactor.core.publisher.Mono.block(Mono.java:1494)
at org.springframework.data.redis.connection.ReactiveRedisConnection.close(ReactiveRedisConnection.java:60)
at org.springframework.data.redis.core.ReactiveRedisTemplate.lambda$doInConnection$3(ReactiveRedisTemplate.java:198)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.runFinally(FluxDoFinally.java:156)
at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onComplete(FluxDoFinally.java:139)
When I inspect the error stacktrace, I find there is a blocking method in ReactiveRedisConnection.close() method.
@Override
default void close() {
closeLater().block();
}
And I also don't know why it's run on the parallel scheduler.
So how can I fix this error, or how to use correctly, thanks!
Affects: 2.1.9 (Lovelace SR9)
Issue Links:
- DATAREDIS-965 ReactiveRedisTemplate is using block()
("supersedes")
Referenced from: pull request #461, and commits feed7b6, 766bd8b, 2131f0c, dfa366d, 3c9c4ac
1 votes, 6 watchers