apache/cassandra · error · Transformation.RejectedTransformationException
Can not add a new in-progress sequence for
Error message
Can not add a new in-progress sequence for %s, since there's already one associated with it: %s
What it means
InProgressSequences.with() rejects adding a new MultiStepOperation under a SequenceKey that already has one, throwing RejectedTransformationException. TCM enforces at most one in-progress sequence per key so transformations remain unambiguous. This is a commit-time conflict, surfaced as a rejected metadata transformation.
Solutions
- Cancel or let the existing sequence finish before starting a new one for the same key
- Check inProgressSequences for the key to see the conflicting sequence and its state
- Make client/automation code idempotent: reuse the existing sequence instead of re-registering
- Handle RejectedTransformationException as an expected conflict and retry after the current sequence completes
Example fix
// before
metadata.transformer().with(key, newSequence).commit();
// after
if (!ClusterMetadata.current().inProgressSequences.contains(key))
metadata.transformer().with(key, newSequence).commit();
else
logger.warn("Sequence already in progress for {}: {}", key, ClusterMetadata.current().inProgressSequences.get(key)); Defensive patterns
Strategy: try-catch
Validate before calling
if (ClusterMetadata.current().inProgressSequences.contains(key))
throw new IllegalStateException("Sequence already registered for " + key); Try / catch
try { transformer.with(key, seq).commit(); } catch (Transformation.RejectedTransformationException e) { logger.warn("Conflicting sequence for {}: {}", key, e.getMessage()); waitForExistingSequenceCompletion(key); retry(); } Prevention
- Serialize sequence-start commands through a single coordination point
- Make registration idempotent: reuse an existing sequence for the same key
- Always cancel a failed sequence before re-registering
When it happens
Trigger: addSequence() attempting to register a bootstrap/replace/move sequence whose SequenceKey already maps to another sequence in the ClusterMetadata transformation, typically a duplicate bootstrap for the same node or a retried sequence registration without cancelling the old one.
Common situations: Two operators concurrently starting sequences for the same node; retry logic re-submitting a sequence registration after a timeout while the first succeeded; automation double-firing a bootstrap request.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- No in progress sequence for
- No in progress sequence of kind for (only in progress)
- All nodes are not yet upgraded
- Another sequence of kind
- Can not commit transformation
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/08e099c8f68a2318.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java:130
{
return state.containsKey(key);
}
public MultiStepOperation<?> get(MultiStepOperation.SequenceKey key)
{
return state.get(key);
}
public boolean isEmpty()
{
return state.isEmpty();
}
public InProgressSequences with(MultiStepOperation.SequenceKey key, MultiStepOperation<?> sequence)
{
if (contains(key))
{
throw new Transformation.RejectedTransformationException(String.format("Can not add a new in-progress sequence for %s, " +
"since there's already one associated with it: %s",
key,
get(key)));
}
ImmutableMap.Builder<MultiStepOperation.SequenceKey, MultiStepOperation<?>> builder = ImmutableMap.builder();
builder.put(key, sequence);
for (Map.Entry<MultiStepOperation.SequenceKey, MultiStepOperation<?>> e : state.entrySet())
{
if (e.getKey().equals(key))
continue;
builder.put(e.getKey(), e.getValue());
}
return new InProgressSequences(lastModified, builder.build());
}
public <T2, T1 extends MultiStepOperation<T2>> InProgressSequences with(MultiStepOperation.SequenceKey key, Function<T1, T1> update)
{View on GitHub (pinned to 88fd0f6a0e)