[ 
https://issues.apache.org/jira/browse/CASSANDRA-6176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13799144#comment-13799144
 ] 

Marcus Eriksson commented on CASSANDRA-6176:
--------------------------------------------

this breaks resetAndTruncate:
{noformat}
    [junit] Testcase: 
testResetAndTruncateCompressed(org.apache.cassandra.io.compress.CompressedRandomAccessReaderTest):
        FAILED
    [junit] Expecting 'The quick brown fox jumps over the lazy dog', got 'brown 
fox jumps over the lazy dog'
    [junit] junit.framework.AssertionFailedError: Expecting 'The quick brown 
fox jumps over the lazy dog', got 'brown fox jumps over the lazy dog'
    [junit]     at 
org.apache.cassandra.io.compress.CompressedRandomAccessReaderTest.testResetAndTruncate(CompressedRandomAccessReaderTest.java:85)
    [junit]     at 
org.apache.cassandra.io.compress.CompressedRandomAccessReaderTest.testResetAndTruncateCompressed(CompressedRandomAccessReaderTest.java:49)
{noformat}

just had a quick look and since the decompression refreshes the internal byte 
[] with the data in the current chunk, and we reset and truncate from the 
middle of the buffer, we might keep garbage in the beginning of the buffer?

> remove decompression code in CompressedSequentialWriter
> -------------------------------------------------------
>
>                 Key: CASSANDRA-6176
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6176
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Dave Brosius
>            Assignee: Dave Brosius
>            Priority: Trivial
>             Fix For: 2.0.2
>
>         Attachments: 6176.txt
>
>
> Changes for https://issues.apache.org/jira/browse/CASSANDRA-5862 have removed 
> the need to decompress chunks during 
> CompressedSequentialWriter.resetAndTruncate.
> remove code.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to