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

Unhandled exception in PartitionsFor in case of network instability #252

Open
FDoKE opened this issue Aug 7, 2023 · 0 comments
Open

Unhandled exception in PartitionsFor in case of network instability #252

FDoKE opened this issue Aug 7, 2023 · 0 comments
Labels

Comments

@FDoKE
Copy link

FDoKE commented Aug 7, 2023

Version

4.3.8

Context

.onComplete method never gets called after some internal NPE.
Caused by netowork instability.

partitionInfoConsumer.partitionsFor(topicName)
                    .onComplete(ar -> {
                        ... someWork
                   })

Logs contains:

05:45:18.718 [vert.x-eventloop-thread-9] [ERROR] [io.vertx.core.impl.ContextBase] - Unhandled exception
java.lang.NullPointerException: null
	at io.vertx.kafka.client.common.impl.Helper.from(Helper.java:109)
	at io.vertx.kafka.client.consumer.impl.KafkaConsumerImpl.lambda$partitionsFor$8(KafkaConsumerImpl.java:473)
	at io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl.lambda$null$1(KafkaReadStreamImpl.java:131)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:246)
	at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:43)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	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)

Looks like leader() contains null.

Do you have a reproducer?

No, it happened while network was unstable.

Steps to reproduce

  1. Call partitionsFor
  2. onComplete never gets called
  3. Logs have unhandled exception (which caused hang)
@FDoKE FDoKE added the bug label Aug 7, 2023
@FDoKE FDoKE changed the title Unhandled exception in PartitionsFor in case of connection shortage Unhandled exception in PartitionsFor in case of network instability Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant