lianetm commented on code in PR #16885: URL: https://github.com/apache/kafka/pull/16885#discussion_r1758694155
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/OffsetsRequestManager.java: ########## @@ -218,18 +490,17 @@ public CompletableFuture<Void> resetPositionsIfNeeded() { * * <p/> * - * When a response is received, positions are validated and, if a log truncation is - * detected, a {@link LogTruncationException} will be saved in memory, to be thrown on the + * When a response is received, positions are validated and, if a log truncation is detected, a + * {@link LogTruncationException} will be saved in memory in cachedUpdatePositionsException, to be thrown on the * next call to this function. */ - public CompletableFuture<Void> validatePositionsIfNeeded() { - Map<TopicPartition, SubscriptionState.FetchPosition> partitionsToValidate = - offsetFetcherUtils.getPartitionsToValidate(); + void validatePositionsIfNeeded() { + Map<TopicPartition, SubscriptionState.FetchPosition> partitionsToValidate = offsetFetcherUtils.getPartitionsToValidate(); Review Comment: you're right, and that's the intention but it's done on the catch further down (exception here would short-circuit the flow as we want, and complete exceptionally on catch). https://github.com/apache/kafka/blob/021a29083cca99fc656b8248fab66d8e9abf05d1/clients/src/main/java/org/apache/kafka/clients/consumer/internals/OffsetsRequestManager.java#L261 Makes sense? -- 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