You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Francois Visconte (Jira)" <ji...@apache.org> on 2024/06/05 11:20:00 UTC
[jira] [Created] (KAFKA-16895) RemoteCopyLagSegments metric taking active segment into account
Francois Visconte created KAFKA-16895:
-----------------------------------------
Summary: RemoteCopyLagSegments metric taking active segment into account
Key: KAFKA-16895
URL: https://issues.apache.org/jira/browse/KAFKA-16895
Project: Kafka
Issue Type: Bug
Components: Tiered-Storage
Affects Versions: 3.7.0, 3.7.1
Reporter: Francois Visconte
The RemoteCopyLagSegment is off by 1 because it also includes the active segment into account while the RemoteCopyLagBytes does substract the size of active segment:
{code:java}
long bytesLag = log.onlyLocalLogSegmentsSize() - log.activeSegment().size();
String topic = topicIdPartition.topic();
int partition = topicIdPartition.partition();
long segmentsLag = log.onlyLocalLogSegmentsCount();
brokerTopicStats.recordRemoteCopyLagBytes(topic, partition, bytesLag);
brokerTopicStats.recordRemoteCopyLagSegments(topic, partition, segmentsLag);
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)