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

hudeqi commented on KAFKA-14979:
--------------------------------

[GitHub Pull Request #13692|https://github.com/apache/kafka/pull/13692] is 
expired.

> Incorrect lag was calculated when markPartitionsForTruncation in 
> ReplicaAlterLogDirsThread
> ------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-14979
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14979
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.2
>            Reporter: hudeqi
>            Assignee: hudeqi
>            Priority: Major
>
> When the partitions of ReplicaFetcherThread finished truncating, the 
> ReplicaAlterLogDirsThread to which these partitions belong needs to be marked 
> truncate. The lag value in the newState (PartitionFetchState) obtained in 
> this process is still the original value (state.lag). If the truncationOffset 
> is smaller than the original state.fetchOffset, then the original lag value 
> is incorrect and needs to be updated. It should be the original lag value 
> plus the difference between the original state.fetchOffset and 
> truncationOffset.
> If the original lag value is used incorrectly, then ReplicaAlterLogDirsThread 
> may set the wrong lag value for fetcherLagStats when executing 
> "processFetchRequest". So it might be more reasonable to recalculate a lag 
> value based on new state.fetchOffset.



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

Reply via email to