{"record":{"id":"da5221b308367841","repo":"apache/cassandra","slug":"s-is-not-a-parsable-int-base10-for-s-da5221","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/SizeTieredCompactionStrategyOptions.java","lineNumber":80,"sourceCode":"        {\n            throw new ConfigurationException(String.format(\"%s is not a parsable float for %s\", optionValue, key), e);\n        }\n    }\n\n    public static Map<String, String> validateOptions(Map<String, String> options, Map<String, String> uncheckedOptions) throws ConfigurationException\n    {\n        String optionValue = options.get(MIN_SSTABLE_SIZE_KEY);\n        try\n        {\n            long minSSTableSize = optionValue == null ? DEFAULT_MIN_SSTABLE_SIZE : Long.parseLong(optionValue);\n            if (minSSTableSize < 0)\n            {\n                throw new ConfigurationException(String.format(\"%s must be non negative: %d\", MIN_SSTABLE_SIZE_KEY, minSSTableSize));\n            }\n        }\n        catch (NumberFormatException e)\n        {\n            throw new ConfigurationException(String.format(\"%s is not a parsable int (base10) for %s\", optionValue, MIN_SSTABLE_SIZE_KEY), e);\n        }\n\n        double bucketLow = parseDouble(options, BUCKET_LOW_KEY, DEFAULT_BUCKET_LOW);\n        double bucketHigh = parseDouble(options, BUCKET_HIGH_KEY, DEFAULT_BUCKET_HIGH);\n        if (bucketHigh <= bucketLow)\n        {\n            throw new ConfigurationException(String.format(\"%s value (%s) is less than or equal to the %s value (%s)\",\n                                                           BUCKET_HIGH_KEY, bucketHigh, BUCKET_LOW_KEY, bucketLow));\n        }\n\n        uncheckedOptions.remove(MIN_SSTABLE_SIZE_KEY);\n        uncheckedOptions.remove(BUCKET_LOW_KEY);\n        uncheckedOptions.remove(BUCKET_HIGH_KEY);\n\n        return uncheckedOptions;\n    }\n\n    @Override","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategyOptions.java#L62-L98","documentation":"ConfigurationException raised when the min_sstable_size option value is not a valid base-10 integer. Long.parseLong throws NumberFormatException, which validateOptions translates into a ConfigurationException naming the bad value and the option key. This guards strategy options at table creation/ALTER time.","triggerScenarios":"CREATE/ALTER TABLE with {'min_sstable_size': '50MB'} or 'abc' or '1e6' — any min_sstable_size that is not a plain base-10 long string.","commonSituations":"Developers appending human-readable units ('50MB', '5G') that Cassandra does not parse; hex values ('0x1000'); values with underscores or thousands separators.","solutions":["Supply a plain decimal byte count, e.g. min_sstable_size = '52428800'.","Remove the option to use the default 50MB.","Convert human-readable sizes to bytes in the tooling that generates the options."],"exampleFix":"// before\n{'min_sstable_size':'50MB'}\n// after\n{'min_sstable_size':'52428800'}","handlingStrategy":"validation","validationCode":"function isValidInt(v) { return /^-?\\d+$/.test(v); }\nif (!isValidInt(opts.min_sstable_size)) throw new Error('min_sstable_size must be a base-10 integer (bytes)');","typeGuard":null,"tryCatchPattern":"try { schema.alterTable(cql); } catch (ConfigurationException e) { if (e.getMessage().contains(\"not a parsable int\")) { /* strip units and retry with a plain integer */ } else throw e; }","preventionTips":["Pass raw byte counts, never '50MB'-style strings — Cassandra does not parse size units.","Convert human-readable sizes to bytes in the emitting tool.","Reject hex/underscore/thousands-separator formats in a pre-submit validator."],"tags":["compaction","configuration","number-format"],"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-17T15:17:12.973Z"}