cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/4] git commit: fix offset calculation
Date Sat, 10 Nov 2012 04:01:29 GMT
fix offset calculation


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/de6260dd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/de6260dd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/de6260dd

Branch: refs/heads/cassandra-1.2
Commit: de6260ddcbc5a532a1aa96f648bc44b55dedf6f2
Parents: 4549a98
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Nov 9 22:01:08 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Nov 9 22:01:08 2012 -0600

----------------------------------------------------------------------
 .../cassandra/io/compress/CompressionMetadata.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/de6260dd/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java b/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
index 81f99aa..0a3f8de 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
@@ -203,9 +203,9 @@ public class CompressionMetadata
             {
                 long offset = i * 8;
                 long chunkOffset = chunkOffsets.getLong(offset);
-                long nextChunkOffset = (i + 8 == chunkOffsets.size())
-                                               ? compressedFileLength
-                                               : chunkOffsets.getLong(offset + 8);
+                long nextChunkOffset = offset + 8 == chunkOffsets.size()
+                                     ? compressedFileLength
+                                     : chunkOffsets.getLong(offset + 8);
                 offsets.add(new Chunk(chunkOffset, (int) (nextChunkOffset - chunkOffset -
4))); // "4" bytes reserved for checksum
             }
         }


Mime
View raw message