apache/cassandra · warning
Initiator directory different from our
Error message
Initiator directory different from our
What it means
Warning logged by the CMS initialization request handler (Election's InitHandler.doVerb) when the directory contained in the initiator's CMSInitializationRequest does not equal the node's own ClusterMetadata directory. The handler sets match=false and dumps the differences; the resulting CMSInitializationResponse with metadataMatches=false causes the initiator to abort migration. Together with error 3132 this prevents migrating onto nodes with divergent membership state.
Source
Thrown at src/java/org/apache/cassandra/tcm/migration/Election.java:237
public class PrepareHandler implements IVerbHandler<CMSInitializationRequest>
{
@Override
public void doVerb(Message<CMSInitializationRequest> message) throws IOException
{
logger.info("Received election initiation message {} from {}", message.payload, message.from());
if (!updateInitiator(null, message.payload.initiator))
throw new IllegalStateException(String.format("Got duplicate initiate migration message from %s, migration is already started by %s", message.from(), initiator()));
logger.info("Sending initiation response");
Directory initiatorDirectory = message.payload.directory;
TokenMap initiatorTokenMap = message.payload.tokenMap;
UUID initiatorSchemaVersion = message.payload.schemaVersion;
ClusterMetadata metadata = ClusterMetadata.current();
boolean match = true;
if (!initiatorDirectory.equals(metadata.directory))
{
match = false;
logger.warn("Initiator directory different from our");
initiatorDirectory.dumpDiff(metadata.directory);
}
if (!initiatorTokenMap.equals(metadata.tokenMap))
{
match = false;
logger.warn("Initiator tokenmap different from ours");
initiatorTokenMap.dumpDiff(metadata.tokenMap);
}
UUID schemaDigest = SchemaKeyspace.calculateSchemaDigest();
if (!initiatorSchemaVersion.equals(schemaDigest))
{
match = false;
logger.warn("Initiator schema different from our: {} != {}", initiatorSchemaVersion, schemaDigest);
}
messaging.send(message.responseWith(new CMSInitializationResponse(message.payload.initiator, match)), message.from());
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Read the dumpDiff output in this node's log to find which directory entries differ, then reconcile membership (restart gossip, wait for full ring convergence) and retry migration
- Ensure all nodes are alive and gossip-consistent before initiating the CMS migration (check `nodetool status` on every node)
- If a node's metadata is unrecoverably divergent, restart it so it reloads/repairs cluster metadata, then re-run the migration
Defensive patterns
Strategy: validation
Validate before calling
ClusterMetadata current = ClusterMetadata.current();
if (!initiatorDirectory.equals(current.directory)) {
initiatorDirectory.dumpDiff(current.directory);
// do not proceed with migration; resync membership first
} Prevention
- Ensure every node observed all recent joins/leaves before initiating migration
- Restart freshly restored nodes so they reload current cluster metadata
- Watch logs for 'Initiator directory different' warnings as an early drift signal
When it happens
Trigger: A node receives TCM_INIT_MIG_REQ during CMS migration and its local ClusterMetadata.directory differs from the initiatorDirectory payload — typically because membership (join/leave/hbo events) diverged between the two nodes before migration started.
Common situations: Nodes saw different sequences of node joins/removals (e.g. one node missed a bootstrap); gossip state out of sync after a node restart; the initiator restarted while a peer was offline so placement/ownership directories drifted.
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
- Value for key {} is only present in the left set: {}
- Value for key {} is only present in the right set: {}
- Initiator tokenmap different from ours
- This cluster is migrating to cluster metadata, can't move un
- This cluster is migrating to cluster metadata, can't abort %
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/b290c77eb010aee2.
Report an issue: GitHub.