cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/6] git commit: make CM.Writer.close idempotent
Date Sun, 29 Dec 2013 02:49:30 GMT
make CM.Writer.close idempotent


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

Branch: refs/heads/cassandra-2.0
Commit: 3eef54097b8ec96d0bdd71499f944f0484787021
Parents: 8a51a72
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sat Dec 28 20:48:49 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Sat Dec 28 20:48:49 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3eef5409/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 7a3f4e7..4cde415 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
@@ -360,7 +360,8 @@ public class CompressionMetadata
 
         public void close() throws IOException
         {
-            getFD().sync();
+            if (getChannel().isOpen()) // if RAF.closed were public we could just use that,
but it's not
+                getChannel().force(true);
             super.close();
         }
     }


Mime
View raw message