You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "T Jake Luciani (JIRA)" <ji...@apache.org> on 2015/05/01 17:29:06 UTC
[jira] [Commented] (CASSANDRA-9276) StreamingTransferTest fails
under test-compression due to bad assertion
[ https://issues.apache.org/jira/browse/CASSANDRA-9276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523327#comment-14523327 ]
T Jake Luciani commented on CASSANDRA-9276:
-------------------------------------------
You're right. this should be assert cis.getTotalCompressedBytesRead() < totalSize
> StreamingTransferTest fails under test-compression due to bad assertion
> -----------------------------------------------------------------------
>
> Key: CASSANDRA-9276
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9276
> Project: Cassandra
> Issue Type: Test
> Reporter: Ariel Weisberg
> Assignee: Ariel Weisberg
> Fix For: 3.x
>
>
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L85
> {noformat}
> assert in.getBytesRead() < totalSize;
> {noformat}
> My guess is that total size is the compressed size, not the uncompressed size. Remove the assertion and the test passes.
> Total size is calculated with
> {noformat}
> long size = 0;
> // calculate total length of transferring chunks
> for (CompressionMetadata.Chunk chunk : compressionInfo.chunks)
> size += chunk.length + 4; // 4 bytes for CRC
> return size;
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)