cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: fix attempting to flush empty rows patch by jbellis; reviewed by jasobrown for CASSANDRA-6374
Date Thu, 21 Nov 2013 21:14:29 GMT
fix attempting to flush empty rows
patch by jbellis; reviewed by jasobrown for CASSANDRA-6374


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

Branch: refs/heads/trunk
Commit: 1ca459d1461cabf1bb3b3df7aa8526415b666b67
Parents: 0d8ea04
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Nov 21 15:14:18 2013 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Nov 21 15:14:18 2013 -0600

----------------------------------------------------------------------
 CHANGES.txt                                    | 1 +
 src/java/org/apache/cassandra/db/Memtable.java | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ca459d1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8cc61ad..24d14ee 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 2.0.4
  * remove RF from nodetool ring output (CASSANDRA-6289)
+ * fix attempting to flush empty rows (CASSANDRA-6374)
 
 
 2.0.3

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ca459d1/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java
index 456221a..1ca7e39 100644
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@ -362,7 +362,9 @@ public class Memtable
                         if (!cfs.indexManager.hasIndexes())
                             currentSize.addAndGet(-ColumnFamilyStore.removeDeletedColumnsOnly(cf,
Integer.MIN_VALUE));
                     }
-                    writer.append((DecoratedKey)entry.getKey(), cf);
+
+                    if (cf.getColumnCount() > 0 || cf.isMarkedForDelete())
+                        writer.append((DecoratedKey)entry.getKey(), cf);
                 }
 
                 if (writer.getFilePointer() > 0)


Mime
View raw message