[ 
https://issues.apache.org/jira/browse/KAFKA-20131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18058459#comment-18058459
 ] 

Viktor Somogyi-Vass edited comment on KAFKA-20131 at 2/13/26 2:40 PM:
----------------------------------------------------------------------

[~kirktrue] on a reconsideration, I would perhaps leave this one out from 
4.0.2. My reasons are that according to the affectsVersions field this existed 
even in 3.0 and seems like it didn't caused too much noise. Also, there are a 
couple of currently ongoing releases and 4.0.2 is a bit old, people may want to 
upgrade to a more recent version anyways which will contain this fix with a 
better likelyhood. If you still want to target this to 4.0.2, please let me 
know.


was (Author: viktorsomogyi):
[~kirktrue] on a reconsideration, I would perhaps leave this one out from 
4.0.2. My reasons are that according to the affectsVersions field this existed 
even in 3.0 and seems like it didn't caused too much noise. Also, there are a 
couple of currently ongoing releases and 4.0.2 is a bit old, people may want to 
upgrade to a more recent version anyways which will hold this fix with a better 
likelyhood. If you still want to target this to 4.0.2, please let me know.

> SubscriptionState endOffsetRequested remains permanently set if LIST_OFFSETS 
> call fails
> ---------------------------------------------------------------------------------------
>
>                 Key: KAFKA-20131
>                 URL: https://issues.apache.org/jira/browse/KAFKA-20131
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, consumer
>    Affects Versions: 3.0.0, 3.9.1, 4.2.0
>            Reporter: Kirk True
>            Assignee: Kirk True
>            Priority: Critical
>             Fix For: 3.9.2, 4.3.0, 4.0.2, 4.1.2, 4.2.1
>
>
> When {{Consumer.currentLag()}} is called, 
> {{SubscriptionState.requestPartitionEndOffset()}} is called, which sets a 
> per-partition flag named {{endOffsetRequested}}. This flag is later cleared 
> by 
> {{SubscriptionState.updateLastStableOffset()}}/{{SubscriptionState.updateHighWatermark()}}
>  when a successful {{LIST_OFFSETS}} call is received. However, if the 
> partition has an error code in the response, or the {{LIST_OFFSETS}} call 
> itself fails, neither update method is called, and {{endOffsetRequested}} 
> remains set. The problem is, on _any subsequent_ call to 
> {{Consumer.currentLag()}}, the logic will see that {{endOffsetRequested}} is 
> already set, and the offset request will be silently ignored.
> The fix is to ensure that {{endOffsetRequested}} is cleared out even on 
> failure cases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to