[ https://issues.apache.org/jira/browse/CASSANDRA-2629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081172#comment-13081172 ]
Sylvain Lebresne commented on CASSANDRA-2629: --------------------------------------------- bq. For convenience I removed a step from scrub in 0002 where if the key/length at the head of a row were corrupt, we retried with the key/length from the index. I'll understand if we want to add this back (would have to push it into the iterator), but either way we end up skipping the row as corrupt (using the index), so I don't think it is much of a loss. We don't end up skipping the row either way. If the index is valid, we end up "repairing the row". I'm for adding this back, as I don't see why this is so unconvenient and doesn't justify the regression. Other comments: * The rewrite of IncomingStreamReader is actually more buggy that IncomingStreamReader is already, in that it uses AbstractCompactRow for everything which in the cases where LCR will be used is problematic. The code in trunk is already problematic however (CASSANDRA-3003). Nevertheless, let's keep the code there as close as it is in trunk because 1) it is more "correct" in trunk and 2) there is no point in changing this code (more than what this ticket require) that will need to be fixed anyway. * In SSTII constructor, dataStart should be set to 0 when the input is a stream. Otherwise an assert of getColumnFamilyWithColumns() that uses headerSize() will fail. I agree that it is not used in streaming right now, but it could, there is no reason to make that fail. Some nits: * In SSTable{Names|Slice}Iterator first constructor, it would be nice to add back the assert that the key given is the same that the one on disk. * In SSTSI.close(), the if (file != null) can be an assert. * In SSTScanner.KSI.next(), there is a start variable that is unused. > Move key reads into SSTableIterators > ------------------------------------ > > Key: CASSANDRA-2629 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2629 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Stu Hood > Assignee: Stu Hood > Priority: Critical > Fix For: 1.0 > > Attachments: > 0001-CASSANDRA-2629-Move-key-and-row-size-reading-into-the-.txt, > 0002-CASSANDRA-2629-Remove-the-retry-with-key-from-index-st.txt > > > All SSTableIterators have a constructor that assumes the key and length has > already been parsed. Moving this logic inside the iterator will improve > symmetry and allow the file format to change without iterator consumers > knowing it. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira