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

io.lettuce.core.protocol.CommandExpiryWriter cannot be cast to io.lettuce.core.protocol.DefaultEndpoint #1882

Closed
heziai opened this issue Oct 19, 2021 · 1 comment
Labels
type: regression A regression from a previous release
Milestone

Comments

@heziai
Copy link

heziai commented Oct 19, 2021

Bug Report

link #1706, it didn't deal with CommandExpiryWriter

Current Behavior

Stack trace
java.util.concurrent.CompletionException: java.lang.ClassCastException: io.lettuce.core.protocol.CommandExpiryWriter cannot be cast to io.lettuce.core.protocol.DefaultEndpoint
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659)
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
	at io.lettuce.core.cluster.RedisClusterClient.lambda$loadPartitionsAsync$28(RedisClusterClient.java:964)
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
	at io.lettuce.core.RedisChannelHandler.lambda$closeAsync$0(RedisChannelHandler.java:162)
	at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:760)
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:736)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)
	at io.lettuce.core.internal.Futures.lambda$adapt$1(Futures.java:120)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615)
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:604)
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
	at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetSuccess(AbstractChannel.java:989)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:762)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:737)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:608)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352)
	at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622)
	at io.netty.channel.AbstractChannelHandlerContext.access$1200(AbstractChannelHandlerContext.java:61)
	at io.netty.channel.AbstractChannelHandlerContext$11.run(AbstractChannelHandlerContext.java:611)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: io.lettuce.core.protocol.CommandExpiryWriter cannot be cast to io.lettuce.core.protocol.DefaultEndpoint
	at io.lettuce.core.cluster.ClusterDistributionChannelWriter.disconnectDefaultEndpoint(ClusterDistributionChannelWriter.java:435)
	at io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl.setPartitions(StatefulRedisClusterConnectionImpl.java:287)
	at io.lettuce.core.cluster.RedisClusterClient.lambda$updatePartitionsInConnections$23(RedisClusterClient.java:907)
	at io.lettuce.core.cluster.RedisClusterClient.forEachCloseable(RedisClusterClient.java:1142)
	at io.lettuce.core.cluster.RedisClusterClient.forEachClusterConnection(RedisClusterClient.java:1120)
	at io.lettuce.core.cluster.RedisClusterClient.updatePartitionsInConnections(RedisClusterClient.java:906)
	at io.lettuce.core.cluster.RedisClusterClient.lambda$refreshPartitionsAsync$21(RedisClusterClient.java:900)
	at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
	... 36 common frames omitted

Environment

  • Lettuce version(s): 6.1.5.RELEASE
@mp911de mp911de added the type: bug A general bug label Dec 3, 2021
@mp911de mp911de added this to the 6.1.6 milestone Dec 3, 2021
@mp911de mp911de added type: regression A regression from a previous release and removed type: bug A general bug labels Dec 3, 2021
@mp911de
Copy link
Collaborator

mp911de commented Dec 3, 2021

That's fixed now.

@mp911de mp911de closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

2 participants