{"record":{"id":"5f0734104fbc2ae1","repo":"apache/cassandra","slug":"can-t-import-sstable-descriptor","errorCode":null,"errorMessage":"Can't import sstable <descriptor>","messagePattern":"Can't import sstable <descriptor>","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/SSTableImporter.java","lineNumber":441,"sourceCode":"        SSTableReader reader = null;\n        try\n        {\n            reader = SSTableReader.open(cfs, descriptor, components, cfs.metadata);\n            IVerifier.Options verifierOptions = IVerifier.options()\n                                                         .extendedVerification(extendedVerify)\n                                                         .checkOwnsTokens(verifyTokens)\n                                                         .quick(!verifySSTables)\n                                                         .invokeDiskFailurePolicy(false)\n                                                         .mutateRepairStatus(false).build();\n\n            try (IVerifier verifier = reader.getVerifier(cfs, new OutputHandler.LogOutput(), false, verifierOptions))\n            {\n                verifier.verify();\n            }\n        }\n        catch (Throwable t)\n        {\n            throw new RuntimeException(\"Can't import sstable \" + descriptor, t);\n        }\n        finally\n        {\n            if (reader != null)\n                reader.selfRef().release();\n        }\n    }\n\n    /**\n     * Depending on the options passed in, this might reset level on the sstable to 0 and/or remove the repair information\n     * from the sstable\n     */\n    private void maybeMutateMetadata(Descriptor descriptor, Options options) throws IOException\n    {\n        if (descriptor.fileFor(Components.STATS).exists())\n        {\n            if (options.resetLevel)\n            {","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/SSTableImporter.java#L423-L459","documentation":"verifySSTableForImport runs an SSTableVerifier over the sstable prior to import to confirm its internal structure is valid. Any Throwable raised by the verifier is wrapped in a RuntimeException prefixed with \"Can't import sstable\" and the descriptor. Import is aborted because importing a structurally invalid sstable could poison the table.","triggerScenarios":"importNewSSTables calls verifySSTableForImport and the verifier detects corruption: broken index references, invalid cell data, mismatched components, or a reader cannot even be constructed for the descriptor.","commonSituations":"Importing sstables copied without digest verification; sstables from an incompatible Cassandra version; hardware corruption on the staging disk; truncated files from interrupted transfers.","solutions":["Re-copy or re-export the sstable set from the source and retry the import","Verify the source sstables with `nodetool verify` / sstableverify on the origin cluster before staging","Inspect the wrapped cause (`Caused by:`) to identify the specific structural problem","Do not attempt to force-import a failed sstable; regenerate it via compaction, repair, or a fresh snapshot"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"try { importer.importNewSSTables(...); } catch (RuntimeException e) { if (e.getMessage() != null && e.getMessage().startsWith(\"Can't import sstable\")) { Throwable cause = e.getCause(); /* inspect verifier failure, replace sstable */ } else throw e; }","preventionTips":["Run sstableverify on the source cluster before exporting snapshots","Use snapshot/backup tooling rather than ad-hoc file copies","Test imports on a staging cluster first"],"tags":["sstable","import","corruption","verification"],"backgroundTag":"checksum-mismatch","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"}