Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix offset calculation

  • Loading branch information...
commit de6260ddcbc5a532a1aa96f648bc44b55dedf6f2 1 parent 4549a98
Jonathan Ellis jbellis authored
6 src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
@@ -203,9 +203,9 @@ public int compare(Chunk o1, Chunk o2)
203 203 {
204 204 long offset = i * 8;
205 205 long chunkOffset = chunkOffsets.getLong(offset);
206   - long nextChunkOffset = (i + 8 == chunkOffsets.size())
207   - ? compressedFileLength
208   - : chunkOffsets.getLong(offset + 8);
  206 + long nextChunkOffset = offset + 8 == chunkOffsets.size()
  207 + ? compressedFileLength
  208 + : chunkOffsets.getLong(offset + 8);
209 209 offsets.add(new Chunk(chunkOffset, (int) (nextChunkOffset - chunkOffset - 4))); // "4" bytes reserved for checksum
210 210 }
211 211 }

0 comments on commit de6260d

Please sign in to comment.
Something went wrong with that request. Please try again.