apache/cassandra · error · java.lang.IllegalStateException
Can not commit transformation: "%s"(%s).
Error message
Can not commit transformation: "%s"(%s).
What it means
failureHandler builds the CommitFailureHandler used by decommission and move. When committing a topology transformation (e.g. PrepareMove or the decommission prepare) fails, it marks the operation failed (e.g. StorageService.markMoveFailed), logs, and throws IllegalStateException carrying the commit result code and message.
Source
Thrown at src/java/org/apache/cassandra/tcm/sequences/SingleNodeSequences.java:207
ClusterMetadataService.instance().commit(new PrepareMove(self,
Collections.singleton(newToken),
ClusterMetadataService.instance().placementProvider(),
true),
m -> m,
failureHandler("PrepareMove", StorageService.instance::markMoveFailed));
InProgressSequences.finishInProgressSequences(self);
if (logger.isDebugEnabled())
logger.debug("Successfully moved to new token {}", StorageService.instance.getLocalTokens().iterator().next());
}
private static ClusterMetadataService.CommitFailureHandler<ClusterMetadata> failureHandler(String type, Runnable markFailed)
{
return (code, msg) -> {
logger.warn("Got failure committing {} transformation: {} {}", type, code, msg);
markFailed.run();
throw new IllegalStateException(String.format("Can not commit transformation: \"%s\"(%s).", code, msg));
};
}
static void resumeMove()
{
if (ClusterMetadataService.instance().isMigrating() || ClusterMetadataService.state() == ClusterMetadataService.State.GOSSIP)
throw new IllegalStateException("This cluster is migrating to cluster metadata, can't move until that is done.");
ClusterMetadata metadata = ClusterMetadata.current();
NodeId self = metadata.myNodeId();
MultiStepOperation<?> sequence = metadata.inProgressSequences.get(self);
if (sequence == null || sequence.kind() != MultiStepOperation.Kind.MOVE)
{
String msg = "No move operation in progress, can't resume";
logger.info(msg);
if (StorageService.instance.operationMode() == MOVE_FAILED)
{
// there is no ongoing move to resume, but operation mode thinks there isView on GitHub (pinned to 88fd0f6a0e)
Solutions
- Check the logged code+message ('Got failure committing ... transformation') for the root cause and fix it (restore CMS quorum, resolve concurrent operation).
- Verify CMS availability and connectivity, then resume the operation: `nodetool resumemove` / finish the decommission.
- If the operation cannot proceed, abort it (`nodetool abortmove` / `abortdecommission`) and retry later.
- Ensure no other topology operation is in flight that conflicts with this one.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!ClusterMetadataService.instance().isCurrent(CMSId)) return; // ensure CMS reachable before committing topology ops
Try / catch
try { move(token); }
catch (IllegalStateException e) { if (e.getMessage().startsWith("Can not commit transformation")) { resumeOrAbort(); } else throw e; } Prevention
- Ensure CMS quorum is healthy before topology operations
- Avoid overlapping topology transformations
- Retry with resume/abort after fixing the commit failure cause
When it happens
Trigger: ClusterMetadataService.commit() invoking the failure handler for a PrepareMove/PrepareLeave transformation - typically because the CMS rejected or could not replicate the transformation (quorum loss, rejected epoch, precondition failure).
Common situations: CMS majority unavailable during a move/decommission; transformation rejected due to concurrent topology change; network partition between the node and CMS members.
Related errors
- Unable to commit rack changes: {r}
- Can not remove a node that has an in-progress sequence
- This cluster is migrating to cluster metadata, can't move un
- Unknown endpoint
- Cannot return topology when accord.enabled = false in cassan
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/46aaf47e3166ea14.
Report an issue: GitHub.