don't force flush of compaction_history after each compaction
patch by jbellis; reviewed by yukim for CASSANDRA-6287


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

Branch: refs/heads/trunk
Commit: e9d34b3753905e2f426335bf8f758b8cf48e90a7
Parents: 84b47c8
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Fri Nov 1 19:45:45 2013 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Sat Nov 2 09:08:51 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                          | 1 +
 src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java | 1 -
 3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e9d34b37/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d439032..aad5e02 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.3
+ * Avoid flushing compaction_history after each operation (CASSANDRA-6287)
  * Fix repair assertion error when tombstones expire (CASSANDRA-6277)
  * Skip loading corrupt key cache (CASSANDRA-6260)
  * Fixes for compacting larger-than-memory rows (CASSANDRA-6274)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e9d34b37/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java 
b/src/java/org/apache/cassandra/config/CFMetaData.java
index f53c60c..c026824 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -517,7 +517,8 @@ public final class CFMetaData
         return newCFMD.comment(comment)
                 .readRepairChance(0)
                 .dcLocalReadRepairChance(0)
-                .gcGraceSeconds(0);
+                .gcGraceSeconds(0)
+                .memtableFlushPeriod(3600 * 1000);
     }
 
     public static CFMetaData newIndexMetadata(CFMetaData parent, 
ColumnDefinition info, AbstractType<?> columnComparator)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e9d34b37/src/java/org/apache/cassandra/db/SystemKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java 
b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index 1917bc8..0dbf36f 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -236,7 +236,6 @@ public class SystemKeyspace
         String req = "INSERT INTO system.%s (id, keyspace_name, 
columnfamily_name, compacted_at, bytes_in, bytes_out, rows_merged) "
                      + "VALUES (%s, '%s', '%s', %d, %d, %d, {%s})";
         processInternal(String.format(req, COMPACTION_HISTORY_CF, 
UUIDGen.getTimeUUID().toString(), ksname, cfname, compactedAt, bytesIn, 
bytesOut, FBUtilities.toString(rowsMerged)));
-            forceBlockingFlush(COMPACTION_HISTORY_CF);
     }
 
     public static TabularData getCompactionHistory() throws OpenDataException

Reply via email to