hachikuji commented on a change in pull request #8822:
URL: https://github.com/apache/kafka/pull/8822#discussion_r441719668



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java
##########
@@ -480,6 +480,17 @@ public synchronized boolean 
maybeValidatePositionForCurrentLeader(ApiVersions ap
                 log.debug("Skipping completed validation for partition {} 
since the current position {} " +
                                 "no longer matches the position {} when the 
request was sent",
                         tp, currentPosition, requestPosition);
+            } else if (epochEndOffset.hasUndefinedEpochOrOffset()) {

Review comment:
       It was what @abbccdda and I had agreed in the previous PR. The problem 
was that we didn't have divergent offsets to include in the exception, so we 
just raised it as OffsetOutOfRange. After I noticed the problem with 
LogTruncationException here, I decided to just simplify the logic here and 
return the truncation exception with the divergent offsets undefined.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to