apache/cassandra · error · IOException
Partitioner does not match validation metadata
Error message
Partitioner does not match validation metadata
What it means
During `nodetool verify`, the partitioner recorded in the SSTable's Validation metadata (stats.db) is compared against the partitioner the node is currently configured to use. If they differ, an IOException is thrown and passed to markAndThrow, marking the SSTable invalid. This guards against reading files written under an incompatible tokenization scheme.
Source
Thrown at src/java/org/apache/cassandra/io/sstable/format/SortedTableVerifier.java:197
if (outputHandler.isDebugEnabled()) outputHandler.debug("Deserializing bloom filter for %s", sstable);
deserializeBloomFilter(sstable);
}
catch (Throwable t)
{
outputHandler.warn(t);
markAndThrow(t);
}
}
protected void verifySSTableMetadata()
{
outputHandler.output("Deserializing sstable metadata for %s ", sstable);
try
{
StatsComponent statsComponent = StatsComponent.load(sstable.descriptor, MetadataType.VALIDATION, MetadataType.STATS, MetadataType.HEADER);
if (statsComponent.validationMetadata() != null &&
!statsComponent.validationMetadata().partitioner.equals(sstable.getPartitioner().getClass().getCanonicalName()))
throw new IOException("Partitioner does not match validation metadata");
}
catch (Throwable t)
{
outputHandler.warn(t);
markAndThrow(t, false);
}
}
protected void verifySSTableVersion()
{
outputHandler.output("Verifying %s (%s)", sstable, FBUtilities.prettyPrintMemory(dataFile.length()));
if (options.checkVersion && !sstable.descriptor.version.isLatestVersion())
{
String msg = String.format("%s is not the latest version, run upgradesstables", sstable);
outputHandler.output(msg);
// don't use markAndThrow here because we don't want a CorruptSSTableException for this.
throw new RuntimeException(msg);
}View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Ensure cassandra.yaml partitioner matches the one the SSTables were written with (usually Murmur3Partitioner).
- Do not copy SSTables between clusters with different partitioners; re-stream data instead (repair, sstableloader, or re-import).
- If the file is truly foreign, remove it and let repair restore correct data.
- Run `sstablemetadata <file>` to inspect the recorded partitioner.
Example fix
// before: mismatched config in cassandra.yaml partitioner: org.apache.cassandra.dht.ByteOrderedPartitioner // after divpartitioner: org.apache.cassandra.dht.Murmur3Partitioner
Defensive patterns
Strategy: validation
Validate before calling
// Java: compare partitioners before loading foreign sstables
String recorded = StatsComponent.load(desc, MetadataType.VALIDATION).validationMetadata().partitioner;
String current = DatabaseDescriptor.getPartitioner().getClass().getCanonicalName();
if (!recorded.equals(current)) throw new IllegalStateException("Partitioner mismatch: " + recorded + " vs " + current); Prevention
- Keep partitioner identical across all clusters you exchange data with (default Murmur3Partitioner)
- Inspect sstablemetadata output before restoring foreign files
- Never edit partitioner in cassandra.yaml on an existing cluster
When it happens
Trigger: Loading an SSTable whose ValidationMetadata.partitioner differs from DatabaseDescriptor's configured partitioner class — e.g. sstable copied from a cluster using a different partitioner, or cassandra.yaml partitioner changed after the file was written.
Common situations: Restoring backups/snapshots into a cluster with a different partitioner; migrating data between clusters with mismatched configs; accidentally changing partitioner in cassandra.yaml (which is unsupported without a full reload).
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Missing directive: partitioner
- Invalid partitioner class
- SSTable format name in %s cannot be null
- SSTable format name for %s must be non-empty, lower-case let
- Multiple sstable format implementations with the same name %
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/00c83e7a7a50dbac.
Report an issue: GitHub.