lucasbru commented on code in PR #14922: URL: https://github.com/apache/kafka/pull/14922#discussion_r1419615776
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java: ########## @@ -713,6 +723,44 @@ boolean runLoop() { return true; } + // visible for testing + void maybeGetClientInstanceIds() { + // we pass in a timeout of zero into each `clientInstanceId()` call + // to just trigger the "get instance id" background RPC; + // we don't want to block the stream thread that can do useful work in the meantime + + if (fetchDeadlineClientInstanceId != -1) { + if (!mainConsumerInstanceIdFuture.isDone()) { + if (fetchDeadlineClientInstanceId >= time.milliseconds()) { + try { + mainConsumerInstanceIdFuture.complete(mainConsumer.clientInstanceId(Duration.ZERO)); + maybeResetFetchDeadline(); + } catch (final IllegalStateException disabledError) { + mainConsumerInstanceIdFuture.complete(null); Review Comment: Sounds good. Yeah a comment will help here -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org