Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14819

Certain table metrics not released when table is dropped.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • Observability/Metrics
    • None
    • Low

    Description

      The following metrics are not released when a table is dropped:

      • CasCommitLatency
      • CasCommitTotalLatency
      • CasPrepareLatency
      • CasPrepareTotalLatency
      • CasProposeLatency
      • CasProposeTotalLatency
      • ReadRepairRequests
      • ShortReadProtectionRequests

       

      This can be verified by inspecting the list of exported MBeans after creating a table then dropping it.

      The result is that if a table with the same name is re-created then the above metrics wont be updated - internally a javax.management.InstanceAlreadyExistsException is thrown by the MBeanServer when the new table's metric is registered, but this exception is silently ignored by org.apache.cassandra.metrics.CassandraMetricsRegistry#registerMBean

      The above metrics were added in 2014/2015, so this issue probably affects all versions released since then.

       

      Attached a patch that releases/removes the metrics when the table is dropped.

      Attachments

        1. release-metrics.patch
          1.0 kB
          Adam Zegelin

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zegelin Adam Zegelin
              Kurt Greaves
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: