cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Griffith (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-11751) Histogram overflow in metrics
Date Wed, 11 May 2016 12:59:13 GMT
Jeff Griffith created CASSANDRA-11751:

             Summary: Histogram overflow in metrics
                 Key: CASSANDRA-11751
             Project: Cassandra
          Issue Type: Bug
          Components: Core
         Environment: Cassandra 2.2.6 on Linux
            Reporter: Jeff Griffith

One particular histogram in the cassandra metrics seems to overflow preventing the calculation
of the mean on the dropwizard "Snapshot". Here is the exception that comes from the metrics

java.lang.IllegalStateException: Unable to compute ceiling for max when histogram overflowed
        at org.apache.cassandra.utils.EstimatedHistogram.rawMean(
        at org.apache.cassandra.metrics.EstimatedHistogramReservoir$HistogramSnapshot.getMean(
        at com.addthis.metrics3.reporter.config.SplunkReporter.reportHistogram(
        at ~[metrics-core-3.1.0.jar:3.1.0]
        at com.codahale.metrics.ScheduledReporter$ ~[metrics-core-3.1.0.jar:3.1.0]
        at java.util.concurrent.Executors$ [na:1.8.0_72]
        at java.util.concurrent.FutureTask.runAndReset( [na:1.8.0_72]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
        at java.util.concurrent.ScheduledThreadPoolExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
        at [na:1.8.0_72]

On deeper analysis, it seems like this is happening specifically on this metric:

I think this is where it is updated in
    public void apply(DecoratedKey key, ColumnFamily columnFamily, SecondaryIndexManager.Updater
indexer, OpOrder.Group opGroup, ReplayPosition replayPosition)
        long start = System.nanoTime();
        Memtable mt = data.getMemtableFor(opGroup, replayPosition);
        final long timeDelta = mt.put(key, columnFamily, indexer, opGroup);
        metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1);
        metric.writeLatency.addNano(System.nanoTime() - start);
        if(timeDelta < Long.MAX_VALUE)

Considering it's calculating a mean, i don't know if perhaps a large sum might be overflowing?
But that "if (timeDelta < Long.MAX_VALUE)" looks suspect, doesn't it?

This message was sent by Atlassian JIRA

View raw message