{"record":{"id":"33496c5d3494c31c","repo":"apache/cassandra","slug":"invalid-configuration-s-s-should-be-less-than","errorCode":null,"errorMessage":"Invalid configuration, %s (%s) should be less than 70%% of the targetSSTableSize (%s)","messagePattern":"Invalid configuration, (.+?) \\((.+?)\\) should be less than 70%% of the targetSSTableSize \\((.+?)\\)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/compaction/unified/Controller.java","lineNumber":633,"sourceCode":"                throw new ConfigurationException(String.format(\"Invalid overlap inclusion method %s. The valid options are %s.\",\n                                                               s,\n                                                               Arrays.toString(Overlaps.InclusionMethod.values())));\n            }\n        }\n\n        s = options.remove(MIN_SSTABLE_SIZE_OPTION);\n        if (s != null)\n        {\n            try\n            {\n                long sizeInBytes = FBUtilities.parseHumanReadableBytes(s);\n                // zero is a valid option to disable feature\n                if (sizeInBytes < 0)\n                    throw new ConfigurationException(String.format(\"Invalid configuration, %s should be greater than or equal to 0 (zero)\",\n                                                                   MIN_SSTABLE_SIZE_OPTION));\n                long limit = (long) Math.ceil(targetSSTableSize * INVERSE_SQRT_2);\n                if (sizeInBytes >= limit)\n                    throw new ConfigurationException(String.format(\"Invalid configuration, %s (%s) should be less than 70%% of the targetSSTableSize (%s)\",\n                                                                   MIN_SSTABLE_SIZE_OPTION,\n                                                                   FBUtilities.prettyPrintMemory(sizeInBytes),\n                                                                   FBUtilities.prettyPrintMemory(targetSSTableSize)));\n            }\n            catch (NumberFormatException e)\n            {\n                throw new ConfigurationException(String.format(\"%s is not a valid size in bytes for %s\",\n                                                               s,\n                                                               MIN_SSTABLE_SIZE_OPTION),\n                                                 e);\n            }\n        }\n\n        s = options.remove(SSTABLE_GROWTH_OPTION);\n        if (s != null)\n        {\n            try\n            {","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compaction/unified/Controller.java#L615-L651","documentation":"The min_sstable_size option must be strictly less than ~70.7% (1/sqrt(2)) of target_sstable_size; validateOptions enforces this so the two sizing options don't conflict. The error reports both values pretty-printed to help compare them.","triggerScenarios":"Setting 'min_sstable_size' >= ceil(target_sstable_size * INVERSE_SQRT_2) in validateOptions, e.g. min 200MiB with target 160MiB.","commonSituations":"Lowering target_sstable_size later without re-checking min_sstable_size; copying option sets from another table whose target size was much larger.","solutions":["Lower min_sstable_size below 70% of target_sstable_size (e.g. min 100MiB for target 160MiB).","Raise target_sstable_size so it is more than sqrt(2) times min_sstable_size.","Set min_sstable_size to 0 to disable the feature and avoid the constraint."],"exampleFix":"// before\n{'target_sstable_size': '160MiB', 'min_sstable_size': '200MiB'}\n// after\n{'target_sstable_size': '160MiB', 'min_sstable_size': '100MiB'}","handlingStrategy":"validation","validationCode":"long min = FBUtilities.parseHumanReadableBytes(opts.get(\"min_sstable_size\"));\nlong target = FBUtilities.parseHumanReadableBytes(opts.get(\"target_sstable_size\"));\nif (min >= Math.ceil(target / Math.sqrt(2))) throw new IllegalArgumentException(\"min_sstable_size must be < ~70% of target_sstable_size\");","typeGuard":null,"tryCatchPattern":"try { applyCompactionOptions(); } catch (ConfigurationException e) { logger.error(\"min/target size conflict: {}\", e.getMessage()); }","preventionTips":["Always validate min_sstable_size and target_sstable_size as a pair, not independently","Recheck the pair whenever you change either option","Use min = 0 (disabled) if the constraint is hard to satisfy"],"tags":["cassandra","configuration","compaction","validation"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}