You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "kirktrue (via GitHub)" <gi...@apache.org> on 2025/10/30 00:08:39 UTC
[PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
kirktrue opened a new pull request, #20792:
URL: https://github.com/apache/kafka/pull/20792
WIP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20792:
URL: https://github.com/apache/kafka/pull/20792#issuecomment-3494724522
A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the `triage` label
should be removed to prevent this automation from happening again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield merged PR #20792:
URL: https://github.com/apache/kafka/pull/20792
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #20792:
URL: https://github.com/apache/kafka/pull/20792#issuecomment-3544538805
Thanks for the review @AndrewJSchofield!
> Please can you implement a test in `ShareConsumerImplTest` which mirrors the test you provided for `KafkaConsumerTest`. This affects the share consumer and we don't really have any test for that.
I added `testConstructorFailsOnNetworkClientConstructorFailure()` to `ShareConsumerImplTest` with minimal changes from `KafkaConsumerTest`’s version. PTAL.
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "kirktrue (via GitHub)" <gi...@apache.org>.
kirktrue commented on PR #20792:
URL: https://github.com/apache/kafka/pull/20792#issuecomment-3544529617
@LiamClarkeNZ—thanks for the review!
> Only feedback is that it might be good to have a unit test at the `AsyncKafkaConsumerTest` level along the lines of one for `KafkaConsumerTest`? But this isn't blocking feedback.
The `AsyncKafkaConsumer` is used under the hood in the `KafkaConsumerTest.testConstructorFailsOnNetworkClientConstructorFailure()`. when the `GroupProtocol` equals `CONSUMER`, under the covers `KafkaConsumer` will create an `AsyncKafkaConsumer`. I'm not sure what form a unit test in `AsyncKafkaConsumerTest` would look like, unless I'm misunderstanding your suggestion 🤔
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #20792:
URL: https://github.com/apache/kafka/pull/20792#discussion_r2543321764
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventHandler.java:
##########
@@ -69,7 +70,8 @@ public ApplicationEventHandler(final LogContext logContext,
networkClientDelegateSupplier,
requestManagersSupplier,
asyncConsumerMetrics);
- this.networkThread.start();
+
+ this.networkThread.start(initializationTimeoutMs);
Review Comment:
Should we shut down the networkThread after it throws an exception? If we don't, we might have a leak since the thread will still be running.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-19394: Failure in ConsumerNetworkThread.initializeResources() can cause hangs on AsyncKafkaConsumer.close() [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #20792:
URL: https://github.com/apache/kafka/pull/20792#discussion_r2543444585
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventHandler.java:
##########
@@ -69,7 +70,8 @@ public ApplicationEventHandler(final LogContext logContext,
networkClientDelegateSupplier,
requestManagersSupplier,
asyncConsumerMetrics);
- this.networkThread.start();
+
+ this.networkThread.start(initializationTimeoutMs);
Review Comment:
I think that's a possibility.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org