apache/cassandra · error · IllegalStateException

Commits are paused, not trying to commit

Error message

Commits are paused, not trying to commit 

What it means

ClusterMetadataService supports pausing metadata commits (e.g. during shutdown, reconfiguration, or migration). If commitsPaused is set, the two-argument commit(transform, onSuccess, onFailure) immediately throws IllegalStateException instead of queueing, signaling the caller that the transformation was never attempted because commits are globally suspended.

Source

Thrown at src/java/org/apache/cassandra/tcm/ClusterMetadataService.java:683

     *   - Sends the commit with a TCM_COMMIT_REQ message
     *   - Message expires after min(cms_await_timeout, remaining sender deadline) to account for CMS node failures.
     *   - On failure/timeout retries use exponential backoff with full jitter to decorrelate cms await timeouts.
     * For CMS members (LOCAL state / AbstractLocalProcessor) for local TCM commits:
     *   - The main outer retry policy described below for TCM_COMMIT_REQ is used without the message expiry,
     *     as the commit runs locally through Paxos without a remote message hop.
     * For CMS members handling TCM_COMMIT_REQ messages (Commit.Handler):
     *   - Deadline is max(now + write_rpc_timeout, message.expiresAtNanos() - write_rpc_timeout), with exponential
     *     backoff and full jitter using the TCM admin initial/max delay. The floor guarantees at least one attempt
     *     window even when cms_await_timeout is misconfigured close to write_rpc_timeout.
     *   - The CMS member reduces its own retry deadline by write_rpc_timeout before the message expiry so it exhausts
     *     retries and returns an explicit failure before the sender's per-message callback fires (see Commit.Handler).
     *
     * @param onFailure     handler checks if rejection has resulted from a retry of the same trasformation.
     */
    public <T1> T1 commit(Transformation transform, CommitSuccessHandler<T1> onSuccess, CommitFailureHandler<T1> onFailure)
    {
        if (commitsPaused.get())
            throw new IllegalStateException("Commits are paused, not trying to commit " + transform);

        long startTime = nanoTime();
        // Replay everything in-flight before attempting a commit
        // We grab highest consecutive epoch here, since we want both local and remote processors to benefit from
        // discover-own-commits via entry id in case of lost messages (in remote case) and Paxos re-proposals (in local case)
        Epoch highestConsecutive = log.waitForHighestConsecutive().epoch;

        Retry retryPolicy = getRetryPolicy(transform.kind());
        logger.info("Committing {} with {}", transform.kind(), retryPolicy);
        Commit.Result result = processor.commit(entryIdGen.get(), transform, highestConsecutive, retryPolicy);

        try
        {
            if (result.isSuccess())
            {
                TCMMetrics.instance.commitSuccessLatency.update(nanoTime() - startTime, NANOSECONDS);
                return onSuccess.accept(awaitAtLeast(result.success().epoch));
            }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Ensure commits are resumed (commitsPaused=false) before issuing transformations.
  2. Move the commit attempt before the pause window or after resume completes.
  3. Retry the operation once commits are unpaused; the transformation was not attempted so retry is safe.
  4. Fix automation to check pause state before issuing schema/topology operations during maintenance.

Example fix

// before
service.commit(new AlterTable(...)); // throws while commits paused
// after
if (!service.isCommitsPaused())
    service.commit(new AlterTable(...));
else
    logger.warn("Deferring commit; commits are paused");
Defensive patterns

Strategy: validation

Validate before calling

if (ClusterMetadataService.instance().isCommitsPaused()) deferCommit(transform);

Try / catch

try { service.commit(transform); } catch (IllegalStateException e) { if (e.getMessage().startsWith("Commits are paused")) scheduleRetryAfterResume(); else throw e; }

Prevention

When it happens

Trigger: Calling commit() (including forceSnapshot) while ClusterMetadataService.commitsPaused AtomicBoolean is true — typically set during node shutdown, TCM migration, or administrative pause of metadata changes.

Common situations: Schema or topology change issued while the node is shutting down or restarting; management tooling pauses commits for maintenance but a background task still attempts a commit; migration scripts issuing commits after pausing.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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