apache/cassandra · error · RuntimeException

Can't import sstable <descriptor>

Error message

Can't import sstable <descriptor>

What it means

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.

Source

Thrown at src/java/org/apache/cassandra/db/SSTableImporter.java:441

        SSTableReader reader = null;
        try
        {
            reader = SSTableReader.open(cfs, descriptor, components, cfs.metadata);
            IVerifier.Options verifierOptions = IVerifier.options()
                                                         .extendedVerification(extendedVerify)
                                                         .checkOwnsTokens(verifyTokens)
                                                         .quick(!verifySSTables)
                                                         .invokeDiskFailurePolicy(false)
                                                         .mutateRepairStatus(false).build();

            try (IVerifier verifier = reader.getVerifier(cfs, new OutputHandler.LogOutput(), false, verifierOptions))
            {
                verifier.verify();
            }
        }
        catch (Throwable t)
        {
            throw new RuntimeException("Can't import sstable " + descriptor, t);
        }
        finally
        {
            if (reader != null)
                reader.selfRef().release();
        }
    }

    /**
     * Depending on the options passed in, this might reset level on the sstable to 0 and/or remove the repair information
     * from the sstable
     */
    private void maybeMutateMetadata(Descriptor descriptor, Options options) throws IOException
    {
        if (descriptor.fileFor(Components.STATS).exists())
        {
            if (options.resetLevel)
            {

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Re-copy or re-export the sstable set from the source and retry the import
  2. Verify the source sstables with `nodetool verify` / sstableverify on the origin cluster before staging
  3. Inspect the wrapped cause (`Caused by:`) to identify the specific structural problem
  4. Do not attempt to force-import a failed sstable; regenerate it via compaction, repair, or a fresh snapshot

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

null

Type guard

null

Try / catch

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; }

Prevention

When it happens

Trigger: 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.

Common situations: Importing sstables copied without digest verification; sstables from an incompatible Cassandra version; hardware corruption on the staging disk; truncated files from interrupted transfers.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/5f0734104fbc2ae1. Report an issue: GitHub.