You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2013/10/19 08:55:32 UTC

[1/2] git commit: Revert "remove decompression code in CompressedSequentialWriter"

Updated Branches:
  refs/heads/trunk 302055583 -> 656d3240f


Revert "remove decompression code in CompressedSequentialWriter"

This reverts commit 9644f098967d6ba9154725148a383b3502ef62c2.


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

Branch: refs/heads/trunk
Commit: 232906d7e01587c32739c61cd72079715c0abb3c
Parents: cfa0e58
Author: Marcus Eriksson <ma...@spotify.com>
Authored: Sat Oct 19 08:48:43 2013 +0200
Committer: Marcus Eriksson <ma...@spotify.com>
Committed: Sat Oct 19 08:50:53 2013 +0200

----------------------------------------------------------------------
 .../io/compress/CompressedSequentialWriter.java         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/232906d7/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java b/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
index da4307e..54b990f 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressedSequentialWriter.java
@@ -21,6 +21,7 @@ import java.io.EOFException;
 import java.io.File;
 import java.io.IOException;
 import java.util.zip.Adler32;
+import java.util.zip.CRC32;
 import java.util.zip.Checksum;
 
 import org.apache.cassandra.io.FSReadError;
@@ -192,6 +193,17 @@ public class CompressedSequentialWriter extends SequentialWriter
         {
             out.seek(chunkOffset);
             out.readFully(compressed.buffer, 0, chunkSize);
+
+            try
+            {
+                // repopulate buffer
+                compressor.uncompress(compressed.buffer, 0, chunkSize, buffer, 0);
+            }
+            catch (IOException e)
+            {
+                throw new CorruptBlockException(getPath(), chunkOffset, chunkSize);
+            }
+
             checksum.update(compressed.buffer, 0, chunkSize);
 
             if (out.readInt() != (int) checksum.getValue())


[2/2] git commit: Merge branch 'cassandra-2.0' into trunk

Posted by ma...@apache.org.
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 656d3240f7488be7cbc05fab7e9dd45616c5cd27
Parents: 3020555 232906d
Author: Marcus Eriksson <ma...@spotify.com>
Authored: Sat Oct 19 08:51:54 2013 +0200
Committer: Marcus Eriksson <ma...@spotify.com>
Committed: Sat Oct 19 08:51:54 2013 +0200

----------------------------------------------------------------------
 .../io/compress/CompressedSequentialWriter.java         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------