{"record":{"id":"ec72fee49817ba47","repo":"apache/cassandra","slug":"stop-marker-is-older-than-start-marker-stopmarke","errorCode":null,"errorMessage":"Stop marker is older than start marker ({stopMarker}<{startMarker}) , so cannot assume we have a complete log of our votes in any consensus groups. Exiting.","messagePattern":"Stop marker is older than start marker \\((.+?)<(.+?)\\) , so cannot assume we have a complete log of our votes in any consensus groups\\. Exiting\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/service/accord/AccordService.java","lineNumber":549,"sourceCode":"    }\n\n    @Override\n    public synchronized void localStartup()\n    {\n        if (state != State.INIT)\n            return;\n\n        boolean rebootstrap = false;\n        {\n            long startMarker = ReplayMarkers.readStartMarker();\n            long stopMarker = ReplayMarkers.readStopMarker();\n            if (stopMarker < startMarker)\n            {\n                switch (getAccord().journal.stopMarkerFailurePolicy)\n                {\n                    default: throw new UnhandledEnum(getAccord().journal.stopMarkerFailurePolicy);\n                    case EXIT:\n                        throw new RuntimeException(\"Stop marker is older than start marker (\" + stopMarker + '<' + startMarker + \") , so cannot assume we have a complete log of our votes in any consensus groups. Exiting.\");\n\n                    case ALLOW_UNSAFE_STARTUP:\n                    case UNSAFE_STARTUP:\n                        logger.warn(\"Stop marker is older than start marker ({}<{}), so cannot assume we have a complete log of our votes in any consensus groups. Continuing to startup as configured.\", stopMarker, startMarker);\n                        break;\n\n                    case REBOOTSTRAP:\n                        logger.info(\"Stop marker is older than start marker ({}<{}). Rebootstrapping.\", stopMarker, startMarker);\n                        rebootstrap = true;\n                }\n            }\n        }\n\n        logger.info(\"Starting background compaction of system_accord\");\n        // We control this ourselves to ensure it starts when we need it, as especially commands_for_key\n        // can accumulate a lot of state and degrade replay performance significantly\n        scheduler.recurring(() -> {\n            CompactionManager.instance.submitBackground(AccordColumnFamilyStores.commandsForKey);","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/AccordService.java#L531-L567","documentation":"Thrown by AccordService.localStartup() when the Accord journal's persisted stop marker is older than its start marker, meaning the journal of consensus-group votes appears incomplete. Because the journal cannot be trusted, the process exits (per accord.journal.stopMarkerFailurePolicy=EXIT) with a RuntimeException.","triggerScenarios":"Node startup where journal markers read from disk satisfy stopMarker < startMarker, and the stopMarkerFailurePolicy is EXIT (the default fail-closed behavior).","commonSituations":"Corrupted or partially truncated Accord journal (disk failure, incomplete flush), restoring a node from an inconsistent/incomplete backup, or manual tampering with journal data files.","solutions":["Treat as data-integrity alarm: stop and verify the node's data/journal files; restore from a known-good backup.","If corruption is confirmed and acceptable, follow the recovery runbook (e.g. journal replay=RESET) after capturing diagnostics.","If explicitly accepted as an unsafe recovery, set accord.journal.stopMarkerFailurePolicy to ALLOW_UNSAFE_STARTUP/UNSAFE_STARTUP and restart, understanding vote-log completeness is not guaranteed.","Check underlying storage (SMART, filesystem errors) before returning the node to service."],"exampleFix":"// before\n-Dcassandra.accord.journal.stopMarkerFailurePolicy=EXIT\n// after (only when unsafe startup is accepted)\n-Dcassandra.accord.journal.stopMarkerFailurePolicy=ALLOW_UNSAFE_STARTUP","handlingStrategy":"fallback","validationCode":"// before startup, if possible\nassertJournalMarkersConsistent(dataDir); // stopMarker >= startMarker\nassertFileSystemHealthy(dataDir);","typeGuard":null,"tryCatchPattern":"catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Stop marker is older than start marker\")) {\n        captureDiagnostics(dataDir);   // never delete journal blindly\n        followJournalRecoveryRunbook();\n    } else throw e;\n}","preventionTips":["Never restore node data directories from partial/inconsistent backups.","Ensure clean shutdowns and healthy disks (monitor SMART, filesystem errors).","Keep journal files with backups before any manual recovery attempt."],"tags":["accord","journal","startup","data-corruption","consistency"],"backgroundTag":"internal-invariant-violation","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"}