{"record":{"id":"83fb01115829a531","repo":"apache/cassandra","slug":"s-is-not-a-parsable-int-base10-for-s","errorCode":null,"errorMessage":"%s is not a parsable int (base10) for %s","messagePattern":"(.+?) is not a parsable int \\(base10\\) for (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java","lineNumber":466,"sourceCode":"        }\n    }\n\n    public static Map<String, String> validateOptions(Map<String, String> options) throws ConfigurationException\n    {\n        String threshold = options.get(TOMBSTONE_THRESHOLD_OPTION);\n        if (threshold != null)\n        {\n            try\n            {\n                float thresholdValue = Float.parseFloat(threshold);\n                if (thresholdValue < 0)\n                {\n                    throw new ConfigurationException(String.format(\"%s must be greater than 0, but was %f\", TOMBSTONE_THRESHOLD_OPTION, thresholdValue));\n                }\n            }\n            catch (NumberFormatException e)\n            {\n                throw new ConfigurationException(String.format(\"%s is not a parsable int (base10) for %s\", threshold, TOMBSTONE_THRESHOLD_OPTION), e);\n            }\n        }\n\n        String interval = options.get(TOMBSTONE_COMPACTION_INTERVAL_OPTION);\n        if (interval != null)\n        {\n            try\n            {\n                long tombstoneCompactionInterval = Long.parseLong(interval);\n                if (tombstoneCompactionInterval < 0)\n                {\n                    throw new ConfigurationException(String.format(\"%s must be greater than 0, but was %d\", TOMBSTONE_COMPACTION_INTERVAL_OPTION, tombstoneCompactionInterval));\n                }\n            }\n            catch (NumberFormatException e)\n            {\n                throw new ConfigurationException(String.format(\"%s is not a parsable int (base10) for %s\", interval, TOMBSTONE_COMPACTION_INTERVAL_OPTION), e);\n            }","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java#L448-L484","documentation":"Thrown as a ConfigurationException when the tombstone_threshold compaction option cannot be parsed as a long/int by Long.parseLong. Cassandra validates all compaction strategy options at table creation/ALTER time via validateOptions, so an unparsable numeric value is rejected before the strategy is instantiated.","triggerScenarios":"Creating or ALTERing a table with compaction option 'tombstone_threshold' set to a non-numeric string, e.g. {tombstone_threshold: 'high'} or {tombstone_threshold: '0.5.1'}.","commonSituations":"Typo in the option value, passing a decimal or percentage string where a plain integer is expected, quoting/escaping issues in cqlsh that leave stray characters in the value.","solutions":["Set tombstone_threshold to a plain base-10 numeric string, e.g. '0.2' (it is parsed as a double elsewhere, so avoid stray characters).","Check the exact value with DESCRIBE TABLE and remove whitespace or invisible characters from the option map.","If a fractional threshold is desired, verify the version's expected format for tombstone_threshold; older versions parse strictly.","Validate the option locally with Long/Double parse before issuing the CQL statement."],"exampleFix":"// before\nALTER TABLE ks.tbl WITH compaction = {'class': 'SizeTieredCompactionStrategy', 'tombstone_threshold': 'twenty'};\n// after\nALTER TABLE ks.tbl WITH compaction = {'class': 'SizeTieredCompactionStrategy', 'tombstone_threshold': '0.2'};","handlingStrategy":"validation","validationCode":"String v = options.get(\"tombstone_threshold\");\nif (v != null) { try { Double.parseDouble(v); } catch (NumberFormatException e) { throw new IllegalArgumentException(\"tombstone_threshold must be numeric: \" + v); } }","typeGuard":null,"tryCatchPattern":"try { session.execute(alterCql); } catch (ConfigurationException e) { /* fix option value and retry */ }","preventionTips":["Always pass numeric compaction options as plain base-10 strings","Lint schema-migration CQL for option value formats","Keep option values free of units, whitespace, and locale formatting"],"tags":["configuration","compaction","validation"],"backgroundTag":"invalid-config-value","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"}