[
https://issues.apache.org/jira/browse/CASSANDRA-5434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624623#comment-13624623
]
Jonathan Ellis commented on CASSANDRA-5434:
-------------------------------------------
I don't think the refactor is algorithmically neutral. The breaks in the
original all got rolled up into the {{if !mutation_details.success: continue}}
block. The reasoning is different for the three but I think they should stay
fatal:
# {{serializedSize == CommitLog.END_OF_SEGMENT_MARKER}} -- this is the most
straightforward, if we're done with the segment then there's no sense in
proceeding (to stuff left over from earlier uses of the segment that are no
longer valid)
# {{checksum.getValue() != claimedSizeChecksum}} -- checksum of size doesn't
match the claimed size. No way to know where to skip to to try to find more
valid entries.
# {{if serializedSize < 10: break}} -- slightly more subtle version of size
checksum mismatch. We've left the file position in the middle of the nonsense
mutation, so trying to read another mutation starting at that point is
hopeless. It's probably hopeless if we read past the bogus serializedSize,
too, since if the author couldn't write a valid size, we don't have much reason
to believe that the next thing he wrote was a valid mutation either.
> 2.0 CommitLogReplayer doesn't read checksum correctly for old commit logs
> -------------------------------------------------------------------------
>
> Key: CASSANDRA-5434
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5434
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Dave Brosius
> Priority: Minor
> Fix For: 2.0
>
> Attachments: 5434.txt
>
>
> use the CommitLogDescriptor.getMessagingVersion() to determine how to read
> the checksum.
> added tests, as well. some refactors to make tests easier.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira