You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeff Jirsa (JIRA)" <ji...@apache.org> on 2017/03/08 14:49:38 UTC
[jira] [Comment Edited] (CASSANDRA-13282) Commitlog replay may fail
if last mutation is within 4 bytes of end of segment
[ https://issues.apache.org/jira/browse/CASSANDRA-13282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901363#comment-15901363 ]
Jeff Jirsa edited comment on CASSANDRA-13282 at 3/8/17 2:49 PM:
----------------------------------------------------------------
[~blambov] It does appear to require 2.1 commitlog segments, yes. I'm not sure it's worth adding a descriptor guard onto it - it should be safe in both situations, though (as you mention) less meaningful in 2.2+. I'm not opposed to it, but I'm also not convinced it's necessary. Will defer to your opinion on that.
was (Author: jjirsa):
[~blambov] Testing did encounter this with 2.1 commitlogs, yes. I'm not sure it's worth adding a descriptor guard onto it - it should be safe in both situations, though (as you mention) less meaningful in 2.2+. I'm not opposed to it, but I'm also not convinced it's necessary. Will defer to your opinion on that.
> Commitlog replay may fail if last mutation is within 4 bytes of end of segment
> ------------------------------------------------------------------------------
>
> Key: CASSANDRA-13282
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13282
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jeff Jirsa
> Assignee: Jeff Jirsa
> Fix For: 2.2.x, 3.0.x, 3.11.x, 4.x
>
> Attachments: whiteboard.png
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)