{"record":{"id":"e716041277c4b75b","repo":"apache/cassandra","slug":"stop-marker-is-older-than-start-marker-so","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/accord/AccordService.java","lineNumber":553,"sourceCode":"    {\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);\n            CompactionManager.instance.submitBackground(AccordColumnFamilyStores.journal);\n        }, 1L, MINUTES);\n\n        long durabilityFlushIntervalNanos = DatabaseDescriptor.getAccordDurabilityFlushInterval(NANOSECONDS);","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/accord/AccordService.java#L535-L571","documentation":"On Accord startup, the journal's stop marker is older than the start marker, so a complete log of votes cannot be assumed. Depending on stopMarkerFailurePolicy the node either exits, logs this warning and continues (unsafe startup), or rebootstraps.","triggerScenarios":"localStartup reads start/stop markers from the Accord journal and finds stopMarker < startMarker (e.g. journal truncation, reverted/rolled-back data directory, restored backup).","commonSituations":"Restoring an older snapshot of the data directory over a newer journal; disk rollback after a crash; manual journal cleanup that removed newer segments; unsafe startup policy configured after failures.","solutions":["Prefer exiting (policy EXIT) and restoring a consistent journal/data directory","If data loss is acceptable, intentionally allow unsafe startup via stopMarkerFailurePolicy","Choose REBOOTSTRAP policy to rejoin the node with a clean Accord state"],"exampleFix":"// before\naccord.journal.stop_marker_failure_policy: ALLOW_UNSAFE_STARTUP\n// after\naccord.journal.stop_marker_failure_policy: REBOOTSTRAP","handlingStrategy":"validation","validationCode":"// before starting, verify journal marker ordering from backups\nif (stopMarker.compareTo(startMarker) < 0 && !allowUnsafe) throw new IllegalStateException(\"journal markers out of order; restore consistent backup\");","typeGuard":null,"tryCatchPattern":"catch (RuntimeException e) { /* choose EXIT/REBOOTSTRAP per stopMarkerFailurePolicy before continuing */ }","preventionTips":["Never restore older data-directory snapshots over newer journals","Set stopMarkerFailurePolicy to EXIT or REBOOTSTRAP in production","Use consistent, atomic backups of data + journal directories"],"tags":["accord","journal","startup","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"}