k-apol commented on code in PR #19913: URL: https://github.com/apache/kafka/pull/19913#discussion_r2142314234
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java: ########## @@ -555,21 +560,12 @@ public Set<String> makeReady(final Map<String, InternalTopicConfig> topics) { } if (!topicsNotReady.isEmpty()) { - currentWallClockMs = time.milliseconds(); - - if (currentWallClockMs >= deadlineMs) { - final String timeoutError = String.format("Could not create topics within %d milliseconds. " + - "This can happen if the Kafka cluster is temporarily not available.", retryTimeoutMs); - log.error(timeoutError); - throw new TimeoutException(timeoutError); - } - log.info( - "Topics {} could not be made ready. Will retry in {} milliseconds. Remaining time in milliseconds: {}", + maybeThrowTimeoutExceptionDuringMakeReady( Review Comment: When I tried adding it as inline, the code style rule for cyclomatic complexity broke. In order to make use of a timeout passed to `init(final Duration timeout)`, I had to add some more logical branches to check for which kind of timeout had happened during `makeReady()` -- 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