Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-9276

StreamingTransferTest fails under test-compression due to bad assertion

    XMLWordPrintableJSON

    Details

      Description

      https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L85

      assert in.getBytesRead() < totalSize;
      

      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

      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;
      

        Attachments

          Activity

            People

            • Assignee:
              aweisberg Ariel Weisberg
              Reporter:
              aweisberg Ariel Weisberg
              Authors:
              Ariel Weisberg
              Reviewers:
              T Jake Luciani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: