{"record":{"id":"caa6b67b13153e0f","repo":"apache/cassandra","slug":"s-is-of-version-s-which-is-now-unsupported-and-c","errorCode":null,"errorMessage":"%s is of version %s which is now unsupported and cannot be read.","messagePattern":"(.+?) is of version (.+?) which is now unsupported and cannot be read\\.","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/io/sstable/Descriptor.java","lineNumber":408,"sourceCode":"\n        SSTableInfo info = validateAndExtractInfo(file);\n        return Pair.create(new Descriptor(info.version, parentOf(file.name(), file), keyspace, table, info.id), info.component);\n    }\n\n    private static List<String> filenameTokens(String name)\n    {\n        List<String> tokens = filenameSplitter.splitToList(name);\n        int size = tokens.size();\n\n        if (size != 4)\n        {\n            // This is an invalid sstable file for this version. But to provide a more helpful error message, we detect\n            // old format sstable, which had the format:\n            //   <keyspace>-<table>-(tmp-)?<version>-<gen>-<component>\n            // Note that we assume it's an old format sstable if it has the right number of tokens: this is not perfect\n            // but we're just trying to be helpful, not perfect.\n            if (size == 5 || size == 6)\n                throw new IllegalArgumentException(String.format(\"%s is of version %s which is now unsupported and cannot be read.\", name, tokens.get(size - 3)));\n            throw new IllegalArgumentException(String.format(\"Invalid sstable file %s: the name doesn't look like a supported sstable file name\", name));\n        }\n        return tokens;\n    }\n\n    private static SSTableInfo validateAndExtractInfo(File file)\n    {\n        String name = file.name();\n        List<String> tokens = filenameTokens(name);\n\n        String versionString = tokens.get(0);\n        if (!Version.validate(versionString))\n            throw invalidSSTable(name, \"invalid version %s\", versionString);\n\n        SSTableId id;\n        try\n        {\n            id = SSTableIdFactory.instance.fromString(tokens.get(1));","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/io/sstable/Descriptor.java#L390-L426","documentation":"Descriptor.filenameTokens() parses an SSTable file name into tokens and maps them to a supported version. When the token layout matches the legacy pre-3.0 naming scheme <keyspace>-<table>-(tmp-)?<version>-<gen>-<component> (5 or 6 tokens), the extracted version is one Cassandra can no longer read, so it throws IllegalArgumentException naming the file and the detected legacy version to aid migration triage.","triggerScenarios":"Pointing Cassandra at a data directory containing old-format SSTables (e.g. 'ks-cf-jb-12-Data.db' style names) so Descriptor.fromFilename/fromFileWithComponent parses them, e.g. during startup, nodetool utilities, or upgrades.","commonSituations":"Upgrading very old clusters in place without running upgradesstables; copying legacy backup SSTables into a modern node's data dir; restoring old snapshots onto a new version.","solutions":["Upgrade the data via a supported path: run the old Cassandra version, then upgradesstables before moving to the new version (stepping through intermediate major versions if required)","Restore old data by exporting/importing (e.g. COPY TO/FROM or sstableloader from the old version) instead of copying files","Delete or archive the legacy SSTable files if the data is no longer needed so the node stops trying to parse them"],"exampleFix":"// before (restoring legacy files directly)\ncp /backup/ks-cf-jb-12-Data.db /var/lib/cassandra/data/ks/cf-<uuid>/\n// after (load via sstableloader from matching version)\nsstableloader -d newnode /backup/ks/cf","handlingStrategy":"validation","validationCode":"String name = file.getName();\nif (name.matches(\"[a-zA-Z0-9_]+-[a-zA-Z0-9_]+-(tmp-)?[a-z]{2}-\\\\d+-.*\"))\n    throw new IllegalArgumentException(\"Legacy pre-3.0 sstable, run upgradesstables on an older version first\");","typeGuard":null,"tryCatchPattern":"try { Descriptor d = Descriptor.fromFilename(file); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"now unsupported and cannot be read\"))\n        // migrate via upgradesstables or sstableloader\n}","preventionTips":["Complete upgradesstables before retiring each old Cassandra version","Never copy legacy SSTable files directly into modern data directories","Audit snapshot/backup contents for old-format file names before restore"],"tags":["sstable","descriptor","versioning","upgrade"],"backgroundTag":"unsupported-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"}