kirktrue commented on code in PR #21457:
URL: https://github.com/apache/kafka/pull/21457#discussion_r2802310618
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java:
##########
@@ -659,14 +659,25 @@ public synchronized Long
partitionEndOffset(TopicPartition tp, IsolationLevel is
public synchronized void requestPartitionEndOffset(TopicPartition tp) {
TopicPartitionState topicPartitionState = assignedState(tp);
- topicPartitionState.requestEndOffset();
+ topicPartitionState.setRequestEndOffset(true);
}
public synchronized boolean partitionEndOffsetRequested(TopicPartition tp)
{
TopicPartitionState topicPartitionState = assignedState(tp);
return topicPartitionState.endOffsetRequested();
}
+ public synchronized boolean
maybeClearPartitionEndOffsetRequested(TopicPartition tp) {
+ TopicPartitionState topicPartitionState = assignedStateOrNull(tp);
+
+ if (topicPartitionState != null &&
topicPartitionState.endOffsetRequested()) {
+ topicPartitionState.setRequestEndOffset(false);
+ return true;
+ } else {
+ return false;
Review Comment:
I left the logging at the higher level for clearing the flag when we fail to
find the offset to match where the logging is done when we _do_ find the
offset, both in `OffsetFetcherUtils`. That's mostly so that we can enable the
log level for a single class to log both the positive and negative cases.
--
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]