apache/cassandra · error
Unable to recover %d partitions that were skipped. You can
Error message
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
What it means
At the end of a scrub, outputSummary reports partitions that were corrupt/unreadable and had to be skipped (badPartitions > 0) while some valid data was recovered. It directs the operator to the pre-scrub snapshot for manual recovery or to run nodetool repair so a healthy replica can re-stream the lost data.
Source
Thrown at src/java/org/apache/cassandra/io/sstable/format/SortedTableScrubber.java:227
{
if (transaction.isOffline())
finished.forEach(sstable -> sstable.selfRef().release());
}
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)View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Run nodetool repair on the affected range/node so a healthy replica re-streams the missing partitions
- If no healthy replica exists, extract the lost partitions manually from the pre-scrub snapshot sstables
- Check host hardware/filesystem health (smartctl, fsck) before trusting the node again
- Verify replication factor is adequate so single-replica corruption is recoverable
Defensive patterns
Strategy: retry
Try / catch
// After scrub, check reported bad partitions and react:
if (scrubReport.badPartitions > 0) { triggerRepair(keyspace, table); verifyPreScrubSnapshotExists(); } Prevention
- Use RF >= 3 so scrub data loss can be repaired from replicas
- Take snapshots before scrubbing important tables
- Monitor disk SMART/health to catch corruption early
- Schedule scrub during low traffic and inspect its output
When it happens
Trigger: nodetool scrub completes with some partitions unreadable due to corruption (bad checksums, truncated file, invalid structure); emitted after the new sstable(s) are written, only when finished is non-empty.
Common situations: See trigger scenarios.
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
- No valid partitions found while scrubbing %s; it is marked f
- Error occurred during scrubbing
- An error occurred while scrubbing the partition with key '%s
- An error occurred while scrubbing the partition with key '%s
- Unrecoverable error while scrubbing %s.Scrubbing cannot cont
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/291223b28785f415.
Report an issue: GitHub.