manangupta111 opened a new pull request, #21468: URL: https://github.com/apache/kafka/pull/21468
Introduces ` RetentionSizeInPercent ` and ` LocalRetentionSizeInPercent ` JMX metrics to express partition storage as a percentage of configured retention limits. No existing metrics or behavior are changed. This PR implements [KIP-1257: Partition Size Percentage Metrics for Storage Monitoring](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1257%3A+Partition+Size+Percentage+Metrics+for+Storage+Monitoring). JMX Metric names ``` kafka.log.remote:type=RemoteLogManager,name=RetentionSizeInPercent,topic=<topic>,partition=<partition> kafka.log.remote:type=RemoteLogManager,name=LocalRetentionSizeInPercent,topic=<topic>,partition=<partition> ``` Testing • Unit tests covering percentage calculations and edge cases • Tests for zero and negative (unlimited) retention configurations • Tests for metric lifecycle (registration, update, cancellation) • Tests verifying metrics are reset on task cancellation -- 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]
