{"record":{"id":"c47f4b527875b2bc","repo":"apache/pulsar","slug":"invalid-auto-split-merge-configuration-message","errorCode":null,"errorMessage":"Invalid auto split/merge configuration: ${message}","messagePattern":"Invalid auto split/merge configuration: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/service/scalable/AutoScaleConfig.java","lineNumber":255,"sourceCode":"        check(splitVsRebucketMinMsgRateIn >= 0,\n                \"splitVsRebucketMinMsgRateInThreshold must be >= 0\");\n        check(maxEntryBucketsPerSegment >= 1 && maxEntryBucketsPerSegment\n                        <= EntryBucketSplits.MAX_BUCKETS,\n                \"maxEntryBucketsPerSegment must be in [1, \" + EntryBucketSplits.MAX_BUCKETS + \"]\");\n        check(splitMsgRateIn > mergeMsgRateIn,\n                \"splitMsgRateInThreshold must be > mergeMsgRateInThreshold (hysteresis)\");\n        check(splitBytesRateIn > mergeBytesRateIn,\n                \"splitBytesRateInThreshold must be > mergeBytesRateInThreshold (hysteresis)\");\n        check(splitMsgRateOut > mergeMsgRateOut,\n                \"splitMsgRateOutThreshold must be > mergeMsgRateOutThreshold (hysteresis)\");\n        check(splitBytesRateOut > mergeBytesRateOut,\n                \"splitBytesRateOutThreshold must be > mergeBytesRateOutThreshold (hysteresis)\");\n        return this;\n    }\n\n    private static void check(boolean condition, String message) {\n        if (!condition) {\n            throw new IllegalArgumentException(\"Invalid auto split/merge configuration: \" + message);\n        }\n    }\n}\n","sourceCodeStart":237,"sourceCodeEnd":259,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/scalable/AutoScaleConfig.java#L237-L259","documentation":"AutoScaleConfig.check is the shared guard for broker auto split/merge (scalable topic) settings. Each validated invariant (thresholds positive, split threshold above merge threshold for hysteresis, etc.) calls check; a violated condition yields an IllegalArgumentException prefixed 'Invalid auto split/merge configuration:'.","triggerScenarios":"Constructing/validating AutoScaleConfig via validated() with inconsistent values, e.g. splitBytesRateOutThreshold <= mergeBytesRateOutThreshold, non-positive thresholds, or other failed invariants.","commonSituations":"broker.conf or per-topic autoscale properties tuned by hand so split and merge thresholds cross; copy of defaults where only one threshold was scaled; units confusion (bytes/s vs entries/s).","solutions":["Read the message suffix to identify which invariant failed and fix that config value","Keep splitBytesRateOutThreshold strictly greater than mergeBytesRateOutThreshold (hysteresis)","Validate config in a staging broker before rollout"],"exampleFix":"// before\nmergeBytesRateOutThreshold = 80_000_000\nsplitBytesRateOutThreshold = 50_000_000\n// after\nmergeBytesRateOutThreshold = 40_000_000\nsplitBytesRateOutThreshold = 80_000_000  // split must exceed merge","handlingStrategy":"validation","validationCode":"if (cfg.getSplitBytesRateOutThreshold() <= cfg.getMergeBytesRateOutThreshold()) {\n    throw new IllegalArgumentException(\"splitBytesRateOutThreshold must exceed mergeBytesRateOutThreshold\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    AutoScaleConfig validated = autoScaleConfig.validated();\n} catch (IllegalArgumentException e) {\n    log.error(\"Autoscale config rejected: {}\", e.getMessage());\n}","preventionTips":["Keep split threshold strictly above merge threshold","Validate config changes in staging before broker rollout","Treat split/merge thresholds as a pair — change them together"],"tags":["pulsar","configuration","autoscaling","illegal-argument"],"backgroundTag":"invalid-configuration-value","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}