kirktrue commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2411120242
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java:
##########
@@ -193,10 +194,13 @@ private void processApplicationEvents() {
try {
if (event instanceof CompletableEvent) {
applicationEventReaper.add((CompletableEvent<?>) event);
- // Check if there are any metadata errors and fail the
CompletableEvent if an error is present.
- // This call is meant to handle "immediately completed
events" which may not enter the awaiting state,
- // so metadata errors need to be checked and handled right
away.
- maybeFailOnMetadataError(List.of((CompletableEvent<?>)
event));
+ }
+ // Check if there are any metadata errors and fail the
CompletableEvent if an error is present.
+ // This call is meant to handle "immediately completed events"
which may not enter the awaiting state,
+ // so metadata errors need to be checked and handled right
away.
+ if (event instanceof MetadataErrorNotifiableEvent) {
+ if
(maybeFailOnMetadataError((MetadataErrorNotifiableEvent) event))
+ continue;
Review Comment:
Done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]