Kamal Chandraprakash created KAFKA-19841:
--------------------------------------------

             Summary: Fix the negative remote bytesLag and segmentsLag metric
                 Key: KAFKA-19841
                 URL: https://issues.apache.org/jira/browse/KAFKA-19841
             Project: Kafka
          Issue Type: Task
            Reporter: Kamal Chandraprakash


* Each broker rotates the segment independently.
 * When the leadership changes to the next replica, then the highest offset 
uploaded to the remote storage might already be higher than the baseOffset of 
the current leader active segment.
 * During this case, the {{onlyLocalLogSegmentsSize}} and 
{{onlyLocalLogSegmentsCount}} returns 0, so the metrics shows negative value (0 
- activeSegment.size).



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

Reply via email to