lianetm commented on code in PR #20324: URL: https://github.com/apache/kafka/pull/20324#discussion_r2274334185
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/OffsetsRequestManager.java: ########## @@ -243,8 +237,11 @@ public CompletableFuture<Boolean> updateFetchPositions(long deadlineMs) { if (subscriptionState.hasAllFetchPositions()) { // All positions are already available + commitOffsetsSharedState.setSubscriptionHasAllFetchPositions(true); Review Comment: uhm updating the cached "subscriptionHasAllPositions" here will run before fetching. Wouldn't we have an outdated cache if the positions become invalid after the fetch result? (ex. fetch out of range that will reset offsets). In such cases, I imagine the positions would become invalid after this point, when processing the fetch result, but the cache will remain with hasAllPositions true and wrongly skip `updateFetchPositions` on the next poll. Am I missing something? I see we only update the cache here and when the assignment changes. -- 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