apache/cassandra · error · IllegalArgumentException

No in progress sequence of kind for (only in progress)

Error message

No in progress sequence of kind  for  (only  in progress)

What it means

After finding an in-progress sequence for the node, cancelInProgressSequences checks that its kind matches the requested kind (e.g. BOOTSTRAP vs REPLACE). A mismatch throws IllegalArgumentException naming the expected kind, the owner, and the kind actually in progress. It prevents cancelling a different operation than the operator intended.

Solutions

  1. Read the actual in-progress kind from the error message and re-issue the cancel with that kind
  2. Confirm what operation the node is performing (bootstrap vs replace vs other MultiStepOperation) before cancelling
  3. Fix the automation/config that hard-codes the wrong kind
  4. If both operations seem in flight, inspect TCM metadata; only one sequence per node should exist

Example fix

// before
seq.cancelInProgressSequences(owner, "BOOTSTRAP");
// after
MultiStepOperation<?> op = ClusterMetadata.current().inProgressSequences.get(NodeId.fromString(owner));
seq.cancelInProgressSequences(owner, op == null ? "BOOTSTRAP" : op.kind().name());
Defensive patterns

Strategy: type-guard

Validate before calling

MultiStepOperation<?> op = ClusterMetadata.current().inProgressSequences.get(NodeId.fromString(owner));
if (op != null && !op.kind().name().equals(expectedKind))
    expectedKind = op.kind().name(); // align with actual

Type guard

boolean kindMatches(String owner, String kind) {
    MultiStepOperation<?> op = ClusterMetadata.current().inProgressSequences.get(NodeId.fromString(owner));
    return op != null && op.kind() == MultiStepOperation.Kind.valueOf(kind);
}

Try / catch

try { cancelInProgressSequences(owner, kind); } catch (IllegalArgumentException e) { logger.warn("Kind mismatch: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling cancelInProgressSequences(owner, "BOOTSTRAP") while the node's in-progress sequence is of kind REPLACE (or vice versa); passing a kind string that is valid but not the one actually running.

Common situations: Copy-pasted nodetool/admin command with the wrong sequence kind; operator assumed a replace but the node is doing a bootstrap; automation using a stale kind after the operation was restarted as a different sequence.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at src/java/org/apache/cassandra/tcm/sequences/InProgressSequences.java:94

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

    public boolean contains(MultiStepOperation.SequenceKey key)
    {

View on GitHub (pinned to 88fd0f6a0e)