apache/cassandra · error · IllegalArgumentException

Cannot reset state and replay from a save point; must modify

Error message

Cannot reset state and replay from a save point; must modify either accord.journal.replay or accord.journal.replay_save_point

What it means

Thrown by AccordService.replayJournal() during node startup when the Accord journal is configured to reset state (accord.journal.replay=RESET) while also having a replay save point configured. These two settings are mutually exclusive, so startup aborts with IllegalArgumentException.

Source

Thrown at src/java/org/apache/cassandra/service/accord/AccordService.java:415

    {
        if (unsafeInstance == NOOP_SERVICE)
            return null;

        AccordService as = (AccordService) unsafeInstance;
        if (as.state != State.STARTING)
            return as;

        as.distributedStartupInternal();
        return as;
    }

    @VisibleForTesting
    private boolean replayJournal(Long2LongHashMap minSegments)
    {
        if (getAccord().journal.replay == RESET)
        {
            if (getAccord().journal.replaySavePoint != ReplaySavePoint.NO)
                throw new IllegalArgumentException("Cannot reset state and replay from a save point; must modify either accord.journal.replay or accord.journal.replay_save_point");
            AccordKeyspace.truncateCommandsForKey();
        }

        logger.info("Starting journal replay.");
        long start = nanoTime();
        boolean success = journal().replay(node.commandStores(), minSegments);
        logger.info("Waiting for command stores to quiesce.");
        ((AccordCommandStores)node.commandStores()).waitForQuiescence();
        getBlocking(node.commandStores().forAll("Post Replay", safeStore -> ((AccordCommandStore)safeStore.commandStore()).rangeIndex().postReplay()));

        long end = nanoTime();
        logger.info("Finished journal replay. {}s elapsed", String.format("%.2f", NANOSECONDS.toMillis(end - start)/1000.0));
        return success;
    }

    public static IAccordService instance()
    {
        IAccordService i = instance;

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set accord.journal.replay_save_point to NO if a full journal reset is intended.
  2. Remove or change accord.journal.replay=RESET if you want to replay from a save point instead.
  3. Restart the node after correcting only one of the two journal settings.
  4. Review the recovery runbook to confirm which of reset vs save-point replay the incident actually requires.

Example fix

// before (jvm-options / cassandra.yaml)
-Dcassandra.accord.journal.replay=RESET
-Dcassandra.accord.journal.replay_save_point=SEGMENT_START
// after
-Dcassandra.accord.journal.replay=RESET
# replay_save_point removed (defaults to NO)
Defensive patterns

Strategy: validation

Validate before calling

// preflight before restart
if (isReset(accordJournalReplay) && !isNo(accordJournalReplaySavePoint))
    throw new IllegalArgumentException("Clear replay_save_point or unset replay=RESET");

Try / catch

catch (IllegalArgumentException e) {
    if (e.getMessage().contains("replay_save_point")) {
        fixJournalConfig(); // set save point to NO or unset RESET
        restartNode();
    } else throw e;
}

Prevention

When it happens

Trigger: Node startup (localStartup) with cassandra.yaml or system properties setting accord.journal.replay to RESET and accord.journal.replay_save_point to anything other than NO.

Common situations: Operator editing Accord troubleshooting/journal settings following docs or a runbook and combining a full-state reset with a saved replay point; leftover config from a previous recovery attempt.

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


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