{"record":{"id":"4ef438c7059a3957","repo":"apache/cassandra","slug":"estimatedhistogram-overflow","errorCode":null,"errorMessage":"EstimatedHistogram overflow: [{}]","messagePattern":"EstimatedHistogram overflow: \\[(.+?)\\]","errorType":"console","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java","lineNumber":512,"sourceCode":"\n        /**\n         * Get the estimated value at the specified quantile in the distribution.\n         *\n         * @param quantile the quantile specified as a value between 0.0 (zero) and 1.0 (one)\n         * @return estimated value at given quantile\n         * @throws IllegalStateException in case the histogram overflowed\n         */\n        @Override\n        public double getValue(double quantile)\n        {\n            assert quantile >= 0 && quantile <= 1.0;\n\n            final int lastBucket = decayingBuckets.length - 1;\n\n            if (decayingBuckets[lastBucket] > 0)\n            {\n                try { throw new IllegalStateException(\"EstimatedHistogram overflow: \" + Arrays.toString(decayingBuckets)); }\n                catch (IllegalStateException e) { noSpamLogger.warn(\"\", e); }\n            }\n\n            final long qcount = (long) Math.ceil(count() * quantile);\n            if (qcount == 0)\n                return 0;\n\n            long elements = 0;\n            for (int i = 0; i < lastBucket; i++)\n            {\n                elements += decayingBuckets[i];\n                if (elements >= qcount)\n                    return bucketOffsets[i];\n            }\n            return 0;\n        }\n\n        /**\n         * Return the number of registered values taking forward decay into account.","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java#L494-L530","documentation":"DecayingEstimatedHistogramReservoir.getValue logs this when the overflow bucket (last bucket) is non-zero: recorded latencies exceeded the histogram's largest representable bucket, so the quantile estimate at the requested point is a lower bound and unreliable. Accompanied by an IllegalStateException per the javadoc.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/metrics/DecayingEstimatedHistogramReservoir.java:512 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat returned quantile values as lower bounds when this appears.","Investigate what produced latencies beyond the histogram range (e.g. GC pauses, stalled nodes)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}