Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
2.2.10, 3.0.13, 3.11.0, 4.0-alpha1, 4.0
-
None
-
Availability - Unavailable
-
Normal
Description
Following CASSANDRA-9749 , stricter correctness checks on commitlog replay can incorrectly detect "corrupt segments" and stop commitlog replay (and potentially stop cassandra, depending on the configured policy). In CommitlogReplayer#replaySyncSection we try to read a 4 byte int serializedSize, and if it's 0 (which will happen due to zeroing when the segment was created), we continue on to the next segment. However, it appears that if a mutation is sized such that it ends with 1, 2, or 3 bytes remaining in the segment, we'll pass the isEOF on the while loop but fail to read the serializedSize int, and fail.