javaspringredislockingredisson

Unexpected error occurred in scheduled task, None of slaves were synced - Java/Spring/Redis


Applying locks on kafka events using redis so that same kafka event will not process by multiple pods.

java.lang.IllegalStateException: None of slaves were synced at org.redisson.RedissonBaseLock.lambda$evalWriteAsync$0(RedissonBaseLock.java:225) at java.util.concurrent.CompletableFuture.uniHandle(Unknown Source) at java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.command.CommandBatchService.lambda$executeAsync$7(CommandBatchService.java:322) at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.command.RedisCommonBatchExecutor.handleResult(RedisCommonBatchExecutor.java:163) at org.redisson.command.RedisExecutor.checkAttemptPromise(RedisExecutor.java:524) at org.redisson.command.RedisExecutor.lambda$execute$4(RedisExecutor.java:176) at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) at java.util.concurrent.CompletableFuture.complete(Unknown Source) at org.redisson.client.handler.CommandDecoder.decodeCommandBatch(CommandDecoder.java:318) at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:210) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:137) at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:113) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279) at io.netty.channel.Abstract...


Solution

  • Fixed in Redisson 3.20.1 version and higher