apache/cassandra · error · IllegalArgumentException
No in progress sequence for
Error message
No in progress sequence for
What it means
cancelInProgressSequences looks up an in-progress MultiStepOperation for the given NodeId in the current ClusterMetadata. If no sequence is registered for that node it throws IllegalArgumentException, because there is nothing to cancel. This guards nodetool-driven cancellation against stale or wrong node identifiers.
Solutions
- Verify the exact node id with nodetool status / cluster metadata before cancelling
- Check whether the sequence already completed or failed; a completed sequence cannot be cancelled
- Re-run the cancellation only if the sequence is genuinely listed as in progress
- If the sequence is stuck but not visible in inProgressSequences, investigate TCM metadata state rather than retrying cancel
Example fix
// before
inProgressSequences.cancelInProgressSequences(nodeId, kind); // may throw if none
// after
if (ClusterMetadata.current().inProgressSequences.get(NodeId.fromString(nodeId)) != null)
inProgressSequences.cancelInProgressSequences(nodeId, kind);
else
logger.info("No in-progress sequence for {}, nothing to cancel", nodeId); Defensive patterns
Strategy: type-guard
Validate before calling
NodeId owner = NodeId.fromString(sequenceOwner);
if (ClusterMetadata.current().inProgressSequences.get(owner) == null)
return false; // nothing to cancel Type guard
boolean hasInProgressSequence(String nodeId) {
return ClusterMetadata.current().inProgressSequences.get(NodeId.fromString(nodeId)) != null;
} Try / catch
try { cancelInProgressSequences(owner, kind); } catch (IllegalArgumentException e) { logger.info("Nothing to cancel for {}: {}", owner, e.getMessage()); } Prevention
- Look up the node id from nodetool status before issuing cancel
- Treat 'already finished' cancels as no-ops in automation
- Make cancel flows idempotent
When it happens
Trigger: Calling StorageService/InProgressSequences.cancelInProgressSequences(owner, kind) with a node id that has no entry in ClusterMetadata.current().inProgressSequences, e.g. after the sequence already completed, failed, or a wrong NodeId string was passed.
Common situations: Operator tries to cancel a bootstrap/replace that already finished; typo in the node id passed to nodetool; attempt to cancel on a node that never started a sequence; retrying a cancel that already succeeded.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No in progress sequence of kind for (only in progress)
- Can not add a new in-progress sequence for
- Keyspace not found in cluster metadata.
- Aggregate ' ' doesn't exist
- All nodes are not yet upgraded
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/31b1bf7b088840c7.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java:91
if (sequence == null)
return metadata;
if (onlyStartupSafeSequences && !sequence.finishDuringStartup())
return metadata;
if (isLeave(sequence))
StorageService.instance.maybeInitializeServices();
if (resume(sequence))
metadata = ClusterMetadata.current();
else
return metadata;
}
}
public static boolean cancelInProgressSequences(String sequenceOwner, String expectedSequenceKind)
{
NodeId owner = NodeId.fromString(sequenceOwner);
MultiStepOperation<?> seq = ClusterMetadata.current().inProgressSequences.get(owner);
if (seq == null)
throw new IllegalArgumentException("No in progress sequence for "+sequenceOwner);
MultiStepOperation.Kind expectedKind = MultiStepOperation.Kind.valueOf(expectedSequenceKind);
if (seq.kind() != expectedKind)
throw new IllegalArgumentException("No in progress sequence of kind " + expectedKind + " for " + owner + " (only " + seq.kind() +" in progress)");
return StorageService.cancelInProgressSequences(owner);
}
@Override
public InProgressSequences withLastModified(Epoch epoch)
{
return new InProgressSequences(epoch, state);
}
@Override
public Epoch lastModified()
{
return lastModified;
}View on GitHub (pinned to 88fd0f6a0e)