apache/cassandra · warning

Initiator schema different from our

Error message

Initiator schema different from our: {} != {}

What it means

Warning logged by the CMS initialization handler when the schema version digest sent by the initiator does not match the digest computed locally via SchemaKeyspace.calculateSchemaDigest(). The handler flags match=false so the initiator aborts migration; schema must be identical cluster-wide before CMS ownership can be migrated.

Solutions

  1. Wait for schema to propagate (check `nodetool describecluster` for schema disagreements) and retry the migration once all nodes report the same schema version
  2. Find and fix schema disagreement: restart the disagreeing nodes or re-run the failed DDL statement so all schema tables converge
  3. Ensure all nodes are on the same Cassandra version before initiating CMS migration
Defensive patterns

Strategy: validation

Validate before calling

UUID localDigest = SchemaKeyspace.calculateSchemaDigest();
if (!initiatorSchemaVersion.equals(localDigest)) {
    // schema disagreement: wait for `nodetool describecluster` to show agreement
    return;
}

Prevention

When it happens

Trigger: Handling TCM_INIT_MIG_REQ where message.payload.schemaVersion (a UUID digest) != SchemaKeyspace.calculateSchemaDigest() on this node — the node's schema tables have diverged from the initiator's.

Common situations: A rolling upgrade where nodes run different Cassandra versions with different schema; a DDL statement (CREATE/ALTER TABLE) applied on some nodes but not yet propagated; a node whose schema agreements failed after a previous DDL; schema pulled from a divergent snapshot.

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


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

Appendix: source

Thrown at src/java/org/apache/cassandra/tcm/migration/Election.java:250

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

    public class AbortHandler implements IVerbHandler<CMSInitializationRequest.Initiator>
    {
        @Override
        public void doVerb(Message<CMSInitializationRequest.Initiator> message) throws IOException
        {
            logger.info("Received election abort message {} from {}", message.payload, message.from());
            CMSInitializationRequest.Initiator remoteInitiator = message.payload;
            if (initiator() == null)
                logger.info("Initiator already cleared, ignoring abort message from {}: {}", message.from(), remoteInitiator);
            else if (!remoteInitiator.endpoint.equals(initiator().endpoint) || !updateInitiator(remoteInitiator, null))
                logger.error("Could not clear initiator - initiator is set to {}, abort message received from {}: {}", initiator(), message.from(), remoteInitiator);
        }
    }

View on GitHub (pinned to 88fd0f6a0e)