kirktrue commented on code in PR #20521:
URL: https://github.com/apache/kafka/pull/20521#discussion_r2400290403
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -726,6 +757,57 @@ private void process(final
StreamsOnAllTasksLostCallbackCompletedEvent event) {
requestManagers.streamsMembershipManager.get().onAllTasksLostCallbackCompleted(event);
}
+ private void process(final CompositePollEvent event) {
+ CompositePollEventProcessorContext context =
compositePollContext.orElseThrow(IllegalArgumentException::new);
+ ApplicationEvent.Type nextEventType = event.startingEventType();
+
+ if (context.maybeCompleteExceptionally(event) ||
context.maybeCompleteWithCallbackRequired(event, nextEventType))
+ return;
+
+ if (nextEventType == ApplicationEvent.Type.POLL) {
+ log.debug("Processing {} logic for {}", nextEventType, event);
+ processPollEvent(event.pollTimeMs());
+ nextEventType = ApplicationEvent.Type.UPDATE_SUBSCRIPTION_METADATA;
+
+ if (context.maybeCompleteExceptionally(event) ||
context.maybeCompleteWithCallbackRequired(event, nextEventType))
Review Comment:
I don't believe we can introduce a `maybeThrowMetadataErrors` step in the
application thread as it needs to access the `NetworkClientDelegate` owned by
the background thread, plus it would need to be a blocking call.
I will experiment with leaving the first call to
`maybeCompleteExceptionally()` in the `process()` method, and removing the
subsequent checks.
--
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]