cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [2/6] cassandra git commit: "disk full" when running cleanup (on a far from full disk)
Date Tue, 31 Mar 2015 08:51:51 GMT
"disk full" when running cleanup (on a far from full disk)

Patch by Robert Stupp; Reviewed by Yuki Morishita for CASSANDRA-9036


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

Branch: refs/heads/cassandra-2.1
Commit: 1e09482a38cbd9bcf4d056781332f8d6e84a624b
Parents: 0ff9c3c
Author: Robert Stupp <snazy@snazy.de>
Authored: Tue Mar 31 10:48:43 2015 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Tue Mar 31 10:48:43 2015 +0200

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e09482a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 539c4c8..bab9421 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.14:
+ * "disk full" when running cleanup (CASSANDRA-9036)
  * Make PasswordAuthenticator number of hashing rounds configurable (CASSANDRA-8085)
  * Lower logging level from ERROR to DEBUG when a scheduled schema pull
    cannot be completed due to a node being down (CASSANDRA-9032)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1e09482a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 74cf286..d8640e8 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1091,6 +1091,11 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
             for (Pair<Long, Long> position : positions)
                 expectedFileSize += position.right - position.left;
         }
+
+        double compressionRatio = getCompressionRatio();
+        if (compressionRatio > 0d)
+            expectedFileSize *= compressionRatio;
+
         return expectedFileSize;
     }
 


Mime
View raw message