{"record":{"id":"cf490e0e5c86774b","repo":"apache/skywalking","slug":"incompatible-bucketedvalues-value-for-current","errorCode":null,"errorMessage":"Incompatible BucketedValues [{value}] for current PercentileFunction[{summation}]","messagePattern":"Incompatible BucketedValues \\[(.+?)\\] for current PercentileFunction\\[(.+?)\\]","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/function/sum/SumHistogramPercentileFunction.java","lineNumber":100,"sourceCode":"    @ElasticSearch.Column(legacyName = \"summation\")\n    @BanyanDB.MeasureField\n    protected DataTable summation = new DataTable(30);\n    /**\n     * Rank\n     */\n    @Getter\n    @Setter\n    @Column(name = RANKS, storageOnly = true)\n    @BanyanDB.MeasureField\n    private IntList ranks = new IntList(10);\n\n    private boolean isCalculated = false;\n\n    @Override\n    public void accept(final MeterEntity entity, final PercentileArgument value) {\n        if (summation.size() > 0) {\n            if (!value.getBucketedValues().isCompatible(summation)) {\n                throw new IllegalArgumentException(\n                    \"Incompatible BucketedValues [\" + value + \"] for current PercentileFunction[\" + summation + \"]\");\n            }\n        }\n\n        for (final int rank : value.getRanks()) {\n            if (rank <= 0) {\n                throw new IllegalArgumentException(\"Illegal rank value \" + rank + \", must be positive\");\n            }\n        }\n\n        if (ranks.size() > 0) {\n            if (ranks.size() != value.getRanks().length) {\n                throw new IllegalArgumentException(\n                    \"Incompatible ranks size = [\" + value.getRanks().length + \"] for current PercentileFunction[\" + ranks\n                        .size() + \"]\");\n            } else {\n                for (final int rank : value.getRanks()) {\n                    if (!ranks.include(rank)) {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/function/sum/SumHistogramPercentileFunction.java#L82-L118","documentation":"SumHistogramPercentileFunction aggregates MAL `sum_histogram_percentile` metrics. Once it has accepted a BucketedValues set, its `summation` bucket layout (bucket count and each bucket's min boundary) is fixed; BucketedValues.isCompatible(summation) returns false when a new input's histogram buckets do not match that layout, and this IllegalArgumentException rejects the input.","triggerScenarios":"The same sum_histogram_percentile metric receives, in one time window, two inputs with different `bucket` steps, different numbers of buckets, or different `bucketMin`/`bucketAlgo` in the MAL histogram() expression (e.g. one rule uses buckets of 100ms and another of 50ms for latency).","commonSituations":"Changing latency bucket thresholds in an otel-rules or meter-analyzer-config YAML and redeploying agents/OAP nodes gradually; two services reporting the same metric name with differently configured agents; copy-pasting a MAL rule and editing only the buckets.","solutions":["Align the bucket definitions of every MAL rule producing this metric: same number of `bucket` entries, same values, same `bucketMin` and alignment","Restart all OAP nodes (or wait for window rollover) after changing bucket config so the new layout is locked consistently","Give differently-bucketed metrics distinct metric names instead of reusing one name"],"exampleFix":"# before — rule A and rule B disagree\nhistogram(step1: 100, ...)\nhistogram(step1: 50, ...)\n# after — both rules use the identical bucket list\nhistogram(step1: 100, step2: 200, step3: 400, ...)","handlingStrategy":"validation","validationCode":"// verify bucket layout matches before accept()\nif (function.getSummation().size() > 0 && !argument.getBucketedValues().isCompatible(function.getSummation())) {\n    log.warn(\"Bucket layout mismatch for {}; dropping sample\", metricName);\n    return;\n}\nfunction.accept(entity, argument);","typeGuard":null,"tryCatchPattern":"Wrap only the accept() call in try-catch (IllegalArgumentException), log the offending BucketedValues and the locked summation layout, and skip the sample so other metrics in the same batch still process.","preventionTips":["Define bucket thresholds once (YAML anchor or shared include) and reuse across all rules for a metric","Coordinate OAP restarts when changing histogram bucket config","Use distinct metric names when bucket layouts must genuinely differ"],"tags":["meter-function","mal","histogram","percentile","metric-config"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}