{"record":{"id":"17f8b1a527b0d672","repo":"apache/cassandra","slug":"unable-to-parse-snapshot-commit-log-position","errorCode":null,"errorMessage":"Unable to parse snapshot commit log position","messagePattern":"Unable to parse snapshot commit log position","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java","lineNumber":185,"sourceCode":"            }\n        }\n        catch (DateTimeParseException e)\n        {\n            throw new RuntimeException(\"Unable to parse restore target time\", e);\n        }\n\n        String snapshotPosition = commitlogCommands.getProperty(\"snapshot_commitlog_position\");\n        CommitLogPosition snapshotCommitLogPosition;\n        try\n        {\n\n            snapshotCommitLogPosition = Strings.isNullOrEmpty(snapshotPosition)\n                                        ? CommitLogPosition.NONE\n                                        : CommitLogPosition.serializer.fromString(snapshotPosition);\n        }\n        catch (ParseException | NumberFormatException e)\n        {\n            throw new RuntimeException(\"Unable to parse snapshot commit log position\", e);\n        }\n\n        return new CommitLogArchiver(archiveCommand,\n                                     restoreCommand,\n                                     restoreDirectories,\n                                     restorePointInTime,\n                                     snapshotCommitLogPosition,\n                                     precision);\n    }\n\n    public void maybeArchive(final CommitLogSegment segment)\n    {\n        if (Strings.isNullOrEmpty(archiveCommand))\n            return;\n\n        archivePending.put(segment.getName(), executor.submit(new WrappedRunnable()\n        {\n            protected void runMayThrow() throws IOException","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java#L167-L203","documentation":"Thrown when the 'snapshot_commitlog_position' property cannot be deserialized back into a CommitLogPosition. The value must be the serialized form produced by CommitLogPosition.serializer (epoch:position); malformed text raises ParseException or NumberFormatException, wrapped here.","triggerScenarios":"getArchiverFromProperties() reads a snapshot_commitlog_position value that is not empty and not a valid serialized CommitLogPosition (wrong separator, non-numeric fields, hand-edited value).","commonSituations":"Hand-editing the properties file and mistyping the position; copying a position string from a different Cassandra version; truncating the value (e.g. '12:' or ':' alone); using human-readable formats instead of the serialized form.","solutions":["Restore the exact serialized value from the snapshot's commitlog position (as written by Cassandra, e.g. epoch:position with numeric fields).","Remove the property entirely (defaults to CommitLogPosition.NONE) if no snapshot position is needed.","Re-derive the value from system tables/logs rather than hand-editing.","Check the chained ParseException/NumberFormatException for the offending field."],"exampleFix":"# before\nsnapshot_commitlog_position: 12:abc\n# after\nsnapshot_commitlog_position: 12:10485760","handlingStrategy":"validation","validationCode":"String s = props.getProperty(\"snapshot_commitlog_position\");\nif (s != null && !s.isEmpty() && !s.trim().matches(\"\\\\d+:\\\\d+\"))\n    throw new IllegalArgumentException(\"snapshot_commitlog_position must be 'epoch:position' numeric pair\");","typeGuard":null,"tryCatchPattern":"try { archiver = CommitLogArchiver.construct(); }\ncatch (RuntimeException e) {\n    if (\"Unable to parse snapshot commit log position\".equals(e.getMessage()))\n        log.error(\"snapshot_commitlog_position must be the serialized CommitLogPosition\", e);\n    throw e;\n}","preventionTips":["Copy snapshot_commitlog_position values from Cassandra output verbatim; never hand-edit","Remove the property when no snapshot restore point is needed","Pin config values taken from one Cassandra version when upgrading"],"tags":["cassandra","commitlog","configuration","parsing"],"backgroundTag":"invalid-config-value","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"}