Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1866

LogStartOffset gauge throws exceptions after log.delete()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.1
    • Fix Version/s: 0.9.0.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

        1. KAFKA-1866.patch
          1 kB
          Sriharsha Chintalapani
        2. KAFKA-1866_2015-02-11_09:25:33.patch
          7 kB
          Sriharsha Chintalapani
        3. KAFKA-1866_2015-02-10_22:50:09.patch
          8 kB
          Sriharsha Chintalapani

          Issue Links

            Activity

              People

              • Assignee:
                sriharsha Sriharsha Chintalapani
                Reporter:
                gian Gian Merlino
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: