[ https://issues.apache.org/jira/browse/KAFKA-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14279412#comment-14279412 ]
Gian Merlino commented on KAFKA-1866: ------------------------------------- At least, I think it has that benefit. I haven't actually tested it yet :) > LogStartOffset gauge throws exceptions after log.delete() > --------------------------------------------------------- > > Key: KAFKA-1866 > URL: https://issues.apache.org/jira/browse/KAFKA-1866 > Project: Kafka > Issue Type: Bug > Reporter: Gian Merlino > > The LogStartOffset gauge does "logSegments.head.baseOffset", which throws > NoSuchElementException on an empty list, which can occur after a delete() of > the log. This makes life harder for custom MetricsReporters, since they have > to deal with .value() possibly throwing an exception. > Locally we're dealing with this by having Log.delete() also call removeMetric > on all the gauges. That also has the benefit of not having a bunch of metrics > floating around for logs that the broker is not actually handling. -- This message was sent by Atlassian JIRA (v6.3.4#6332)