apache/cassandra · critical

No valid partitions found while scrubbing %s; it is marked f

Error message

No valid partitions found while scrubbing %s; it is marked for deletion now. If you want to attempt manual recovery, you can find a copy in the pre-scrub snapshot

What it means

outputSummary warns when a scrub found zero valid partitions and at least one bad partition: the entire sstable was unreadable, so no replacement sstable is produced and the original is marked for deletion. The pre-scrub snapshot is the only remaining copy on this node; recovery otherwise depends on other replicas.

Source

Thrown at src/java/org/apache/cassandra/io/sstable/format/SortedTableScrubber.java:232

        outputSummary(finished);
    }

    protected abstract void scrubInternal(SSTableRewriter writer) throws IOException;

    private void outputSummary(List<SSTableReader> finished)
    {
        if (!finished.isEmpty())
        {
            outputHandler.output("Scrub of %s complete: %d partitions in new sstable and %d empty (tombstoned) partitions dropped", sstable, goodPartitions, emptyPartitions);
            if (negativeLocalDeletionInfoMetrics.fixedRows > 0)
                outputHandler.output("Fixed %d rows with overflowed local deletion time.", negativeLocalDeletionInfoMetrics.fixedRows);
            if (badPartitions > 0)
                outputHandler.warn("Unable to recover %d partitions that were skipped.  You can attempt manual recovery from the pre-scrub snapshot.  You can also run nodetool repair to transfer the data from a healthy replica, if any", badPartitions);
        }
        else
        {
            if (badPartitions > 0)
                outputHandler.warn("No valid partitions found while scrubbing %s; it is marked for deletion now. If you want to attempt manual recovery, you can find a copy in the pre-scrub snapshot", sstable);
            else
                outputHandler.output("Scrub of %s complete; looks like all %d partitions were tombstoned", sstable, emptyPartitions);
        }
    }

    private SSTableReader writeOutOfOrderPartitions(StatsMetadata metadata)
    {
        // out of order partitions/rows, but no bad partition found - we can keep our repairedAt time
        long repairedAt = badPartitions > 0 ? ActiveRepairService.UNREPAIRED_SSTABLE : sstable.getSSTableMetadata().repairedAt;
        SSTableReader newInOrderSstable;
        try (SSTableWriter inOrderWriter = CompactionManager.createWriter(cfs, destination, expectedBloomFilterSize, repairedAt, metadata.pendingRepair, metadata.isTransient, sstable, transaction))
        {
            for (Partition partition : outOfOrder)
                inOrderWriter.append(partition.unfilteredIterator());
            inOrderWriter.setRepairedAt(-1);
            inOrderWriter.setMaxDataAge(sstable.maxDataAge);
            newInOrderSstable = inOrderWriter.finish(true);
        }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Immediately run nodetool repair (or a full rebuild) so other replicas restore the data
  2. Before the sstable is purged, copy the pre-scrub snapshot elsewhere for possible manual salvage
  3. Investigate storage health — total corruption usually indicates disk/filesystem failure
  4. If replication factor was 1 with no backup, the data may be unrecoverable; assess from backups
Defensive patterns

Strategy: validation

Try / catch

// Treat total-scrub-failure as an incident:
if (scrubReport.goodPartitions == 0 && scrubReport.badPartitions > 0) { preserveSnapshot(); pageOnCall(); startRepair(); }

Prevention

When it happens

Trigger: nodetool scrub on an sstable where every partition fails parsing/validation (badPartitions > 0 && finished.isEmpty()) — typically severe or total file corruption.

Common situations: Totally truncated or overwritten data file; filesystem corruption; restoring mismatched/incompatible sstable files from a bad backup.

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/a78e34adc5eb133e. Report an issue: GitHub.