sunm2n commented on code in PR #24181:
URL: https://github.com/apache/kafka/pull/24181#discussion_r4544812727


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/OffsetsRequestManager.java:
##########
@@ -413,16 +421,20 @@ private CompletableFuture<Void> 
initWithPartitionOffsetsIfNeeded(Set<TopicPartit
      *                               when resetting positions for partitions 
that may not have committed offsets).
      * @param deadlineMs             Deadline of the application event that 
triggered this operation. Used to
      *                               determine how much time to allow for the 
reused offset fetch to complete.
+     * @return Future that completes with true if the partitions that still 
have no position should be reset
+     * using the configured offset reset strategy, or false if the fetch 
failed because the member is no longer

Review Comment:
   Agreed, that is cleaner. `initWithCommittedOffsetsIfNeeded` is back to 
returning `CompletableFuture<Void>` and propagating errors as before. The 
decision to skip the reset is now only in `updatePositionsWithOffsets`, 
covering both new and reused requests.
   
   I kept the logging in `refreshOffsets`, which runs once for the pending 
fetch. Logging in the caller would repeat the message for each 
`updateFetchPositions` call sharing that fetch. This also keeps the fenced/left 
case at INFO instead of producing the existing ERROR log.
   



-- 
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]

Reply via email to