{"record":{"id":"df4c1b39fb52d0f6","repo":"apache/cassandra","slug":"cannot-reset-state-and-replay-from-a-save-point-m","errorCode":null,"errorMessage":"Cannot reset state and replay from a save point; must modify either accord.journal.replay or accord.journal.replay_save_point","messagePattern":"Cannot reset state and replay from a save point; must modify either accord\\.journal\\.replay or accord\\.journal\\.replay_save_point","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/accord/AccordService.java","lineNumber":415,"sourceCode":"    {\n        if (unsafeInstance == NOOP_SERVICE)\n            return null;\n\n        AccordService as = (AccordService) unsafeInstance;\n        if (as.state != State.STARTING)\n            return as;\n\n        as.distributedStartupInternal();\n        return as;\n    }\n\n    @VisibleForTesting\n    private boolean replayJournal(Long2LongHashMap minSegments)\n    {\n        if (getAccord().journal.replay == RESET)\n        {\n            if (getAccord().journal.replaySavePoint != ReplaySavePoint.NO)\n                throw new IllegalArgumentException(\"Cannot reset state and replay from a save point; must modify either accord.journal.replay or accord.journal.replay_save_point\");\n            AccordKeyspace.truncateCommandsForKey();\n        }\n\n        logger.info(\"Starting journal replay.\");\n        long start = nanoTime();\n        boolean success = journal().replay(node.commandStores(), minSegments);\n        logger.info(\"Waiting for command stores to quiesce.\");\n        ((AccordCommandStores)node.commandStores()).waitForQuiescence();\n        getBlocking(node.commandStores().forAll(\"Post Replay\", safeStore -> ((AccordCommandStore)safeStore.commandStore()).rangeIndex().postReplay()));\n\n        long end = nanoTime();\n        logger.info(\"Finished journal replay. {}s elapsed\", String.format(\"%.2f\", NANOSECONDS.toMillis(end - start)/1000.0));\n        return success;\n    }\n\n    public static IAccordService instance()\n    {\n        IAccordService i = instance;","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/AccordService.java#L397-L433","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set accord.journal.replay_save_point to NO if a full journal reset is intended.","Remove or change accord.journal.replay=RESET if you want to replay from a save point instead.","Restart the node after correcting only one of the two journal settings.","Review the recovery runbook to confirm which of reset vs save-point replay the incident actually requires."],"exampleFix":"// before (jvm-options / cassandra.yaml)\n-Dcassandra.accord.journal.replay=RESET\n-Dcassandra.accord.journal.replay_save_point=SEGMENT_START\n// after\n-Dcassandra.accord.journal.replay=RESET\n# replay_save_point removed (defaults to NO)","handlingStrategy":"validation","validationCode":"// preflight before restart\nif (isReset(accordJournalReplay) && !isNo(accordJournalReplaySavePoint))\n    throw new IllegalArgumentException(\"Clear replay_save_point or unset replay=RESET\");","typeGuard":null,"tryCatchPattern":"catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"replay_save_point\")) {\n        fixJournalConfig(); // set save point to NO or unset RESET\n        restartNode();\n    } else throw e;\n}","preventionTips":["Only change one Accord journal recovery setting at a time.","Keep a config checklist for recovery procedures; audit for leftover flags after incidents.","Document that RESET and replay_save_point are mutually exclusive."],"tags":["accord","journal","configuration","startup","conflicting-options"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}