{"record":{"id":"2078cbe285f81544","repo":"apache/cassandra","slug":"invalid-overlap-inclusion-method-s-the-valid-opt","errorCode":null,"errorMessage":"Invalid overlap inclusion method %s. The valid options are %s.","messagePattern":"Invalid overlap inclusion method (.+?)\\. The valid options are (.+?)\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/compaction/unified/Controller.java","lineNumber":615,"sourceCode":"                                                               s,\n                                                               EXPIRED_SSTABLE_CHECK_FREQUENCY_SECONDS_OPTION),\n                                                 e);\n            }\n        }\n\n        validateBoolean(options, ALLOW_UNSAFE_AGGRESSIVE_SSTABLE_EXPIRATION_OPTION);\n        validateBoolean(options, PARALLELIZE_OUTPUT_SHARDS_OPTION);\n\n        s = options.remove(OVERLAP_INCLUSION_METHOD_OPTION);\n        if (s != null)\n        {\n            try\n            {\n                Overlaps.InclusionMethod.valueOf(toUpperCaseLocalized(s));\n            }\n            catch (IllegalArgumentException e)\n            {\n                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)\",","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compaction/unified/Controller.java#L597-L633","documentation":"The overlap inclusion method option must be one of the Overlaps.InclusionMethod enum values; validateOptions rejects any other string. This option controls how sstable overlap is computed for unified compaction (e.g. SINGLE vs TRANSITIVE).","triggerScenarios":"Setting compaction option 'overlap_inclusion_method' (or similar Overlaps option) to a string not in Arrays.toString(Overlaps.InclusionMethod.values()) during validateOptions; valueOf on the uppercased string throws IllegalArgumentException.","commonSituations":"Misspelling an enum constant ('transitive' vs correct casing is fine since it's uppercased, but 'transitve' is not); using an option name valid in a different Cassandra version.","solutions":["Use one of the exact values listed in the error message from Overlaps.InclusionMethod.values().","Check the enum definition in Overlaps.java for the valid constants for your Cassandra version.","Remove the option to use the default inclusion method."],"exampleFix":"// before\n'overlap_inclusion_method': 'transitive_overlap'\n// after\n'overlap_inclusion_method': 'TRANSITIVE'","handlingStrategy":"validation","validationCode":"String s = opts.get(\"overlap_inclusion_method\");\nif (s != null) Overlaps.InclusionMethod.valueOf(s.toUpperCase(Locale.ROOT)); // throws if invalid","typeGuard":null,"tryCatchPattern":"try { createTable(withOptions); } catch (ConfigurationException e) { logger.error(\"Bad overlap_inclusion_method, valid: {}\", Arrays.toString(Overlaps.InclusionMethod.values())); }","preventionTips":["Copy enum constant names from Overlaps.InclusionMethod, never type them from memory","Parse the valid options out of the ConfigurationException message when debugging","Pin config templates to a Cassandra version — enum options vary between versions"],"tags":["cassandra","configuration","compaction","enum"],"backgroundTag":"invalid-enum-value","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"}