cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [3/4] git commit: Fix writing the checksum before closing the sstable.
Date Thu, 22 May 2014 14:16:33 GMT
Fix writing the checksum before closing the sstable.

Patch by Sankalp Kohli, reviewed by Benedict for CASSANDRA-7285


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

Branch: refs/heads/cassandra-2.1
Commit: 9bd38878059932e83163c1354c7453e494cda3b1
Parents: 36cc02c
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Thu May 22 09:12:11 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Thu May 22 09:12:11 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/io/sstable/SSTableWriter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9bd38878/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
index f32bb96..9567f0e 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
@@ -459,11 +459,12 @@ public class SSTableWriter extends SSTable
 
     private Pair<Descriptor, StatsMetadata> close(long repairedAt)
     {
-        dataFile.writeFullChecksum(descriptor);
+
         // index and filter
         iwriter.close();
         // main data, close will truncate if necessary
         dataFile.close();
+        dataFile.writeFullChecksum(descriptor);
         // write sstable statistics
         Map<MetadataType, MetadataComponent> metadataComponents = sstableMetadataCollector.finalizeMetadata(
                                                                                     partitioner.getClass().getCanonicalName(),


Mime
View raw message