{"record":{"id":"6dd80e5fe56b97a9","repo":"apache/cassandra","slug":"unknown-sstable-format-s","errorCode":null,"errorMessage":"Unknown sstable format: %s","messagePattern":"Unknown sstable format: (.+?)","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":6162,"sourceCode":"        applySSTableFormats(factories, config);\n    }\n\n    public static ImmutableMap<String, SSTableFormat<?, ?>> getSSTableFormats()\n    {\n        return Objects.requireNonNull(sstableFormats, \"Forgot to initialize DatabaseDescriptor?\");\n    }\n\n    public static SSTableFormat<?, ?> getSelectedSSTableFormat()\n    {\n        return Objects.requireNonNull(selectedSSTableFormat, \"Forgot to initialize DatabaseDescriptor?\");\n    }\n\n    @VisibleForTesting\n    public static void setSelectedSSTableFormat(String name)\n    {\n        SSTableFormat<?, ?> format = getSSTableFormats().get(name);\n        if (format == null)\n            throw new IllegalArgumentException(\"Unknown sstable format: \" + name);\n        setSelectedSSTableFormat(format);\n    }\n\n    @VisibleForTesting\n    public static void setSelectedSSTableFormat(SSTableFormat<?, ?> format)\n    {\n        selectedSSTableFormat = Objects.requireNonNull(format);\n    }\n\n    public static boolean getDynamicDataMaskingEnabled()\n    {\n        return conf.dynamic_data_masking_enabled;\n    }\n\n    public static void setDynamicDataMaskingEnabled(boolean enabled)\n    {\n        if (enabled != conf.dynamic_data_masking_enabled)\n        {","sourceCodeStart":6144,"sourceCodeEnd":6180,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L6144-L6180","documentation":"DatabaseDescriptor.setSelectedSSTableFormat(String) looks up the named format in the registered sstable format table and throws IllegalArgumentException when no format with that name exists. SSTable formats must be registered before they can be selected.","triggerScenarios":"Calling setSelectedSSTableFormat(\"big\") or any name not present in getSSTableFormats(); typically via @VisibleForTesting paths or config that specifies an sstable_format name that is not registered.","commonSituations":"Typos in the format name (case-sensitive lookup); attempting to select a pluggable format whose jar is not on the classpath/registered; tests referencing format names from a different Cassandra version.","solutions":["Use a registered format name exactly as returned by DatabaseDescriptor.getSSTableFormats() (e.g. via the SSTableFormat instance overload).","Register/verify the custom format implementation is loaded before selection.","Check spelling and case of the format name."],"exampleFix":"// before\nDatabaseDescriptor.setSelectedSSTableFormat(\"BIG\"); // not registered by that name\n// after\nDatabaseDescriptor.setSelectedSSTableFormat(\"bti\");","handlingStrategy":"validation","validationCode":"if (DatabaseDescriptor.getSSTableFormats().containsKey(name)) DatabaseDescriptor.setSelectedSSTableFormat(name);","typeGuard":"boolean isKnownSSTableFormat(String name) { return DatabaseDescriptor.getSSTableFormats().containsKey(name); }","tryCatchPattern":"try { DatabaseDescriptor.setSelectedSSTableFormat(name); } catch (IllegalArgumentException e) { log.error(\"unknown sstable format: \" + name, e); }","preventionTips":["Copy format names exactly from getSSTableFormats() key set.","Ensure custom format plugins are registered before selection.","Watch case sensitivity in format names."],"tags":["sstable","configuration","illegal-argument"],"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"}