[ https://issues.apache.org/jira/browse/CASSANDRA-16842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh McKenzie updated CASSANDRA-16842: -------------------------------------- Status: Ready to Commit (was: Review In Progress) > Allow CommitLogSegmentReader to optionally skip sync marker CRC checks > ---------------------------------------------------------------------- > > Key: CASSANDRA-16842 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16842 > Project: Cassandra > Issue Type: Improvement > Components: Local/Commit Log > Reporter: Caleb Rackliffe > Assignee: Caleb Rackliffe > Priority: Normal > Fix For: 4.x > > Time Spent: 20m > Remaining Estimate: 0h > > CommitLog sync markers are written in two phases. In the first, zeroes are > written for the position of the next sync marker and the sync marker CRC > value. In the second, when the next sync marker is written, the actual > position and CRC values are written. If the process shuts down in a > disorderly fashion, it is entirely possible for a valid next marker position > to be written to our memory mapped file but not the final CRC value. Later, > when we attempt to replay the segment, we will fail without recovering any of > the perfectly valid mutations it contains. (This assumes we’re confining > ourselves to the case where there is no compression or encryption.) > {noformat} > ERROR 2020-11-18T10:55:23,888 [main] > org.apache.cassandra.utils.JVMStabilityInspector:102 - Exiting due to error > while processing commit log during initialization. > org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: > Encountered bad header at position 23091775 of commit log > …/CommitLog-6-1605699607608.log, with invalid CRC. The end of segment marker > should be zero. > at > org.apache.cassandra.db.commitlog.CommitLogReplayer.handleReplayError(CommitLogReplayer.java:731) > at > org.apache.cassandra.db.commitlog.CommitLogReplayer.readSyncMarker(CommitLogReplayer.java:274) > at > org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(CommitLogReplayer.java:436) > at > org.apache.cassandra.db.commitlog.CommitLogReplayer.recover(CommitLogReplayer.java:189) > at > org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:170 > at > org.apache.cassandra.db.commitlog.CommitLog.recover(CommitLog.java:151) > at > org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:332) > at > org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:656) > at > org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:808) > {noformat} > It may be useful to provide an option that would allow us to override the > default/strict behavior here and skip the CRC check if a non-zero end > position is present, allowing valid mutations to be recovered and startup to > proceed. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org