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: add cassandra.unsafetruncate property patch by jbellis; reviewed by brandonwilliams for CASSANDRA-5704
Date Wed, 17 Jul 2013 19:05:08 GMT
add cassandra.unsafetruncate property
patch by jbellis; reviewed by brandonwilliams for CASSANDRA-5704


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

Branch: refs/heads/trunk
Commit: 0feb59a97016a311989d6a7d1db0fc1ef46603fa
Parents: 3280fb0
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Jul 17 12:04:17 2013 -0700
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Jul 17 12:04:17 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0feb59a9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 00148a3..09f4c7b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.7
+ * add cassandra.unsafetruncate property (CASSANDRA-5704)
  * (Hadoop) quote identifiers in CqlPagingRecordReader (CASSANDRA-5763)
  * Add replace_node functionality for vnodes (CASSANDRA-5337)
  * Add timeout events to query traces (CASSANDRA-5520)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0feb59a9/src/java/org/apache/cassandra/db/SystemTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java b/src/java/org/apache/cassandra/db/SystemTable.java
index 187aac5..1d9fd72 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -185,7 +185,8 @@ public class SystemTable
     {
         String req = "UPDATE system.%s SET truncated_at = truncated_at + %s WHERE key = '%s'";
         processInternal(String.format(req, LOCAL_CF, truncationAsMapEntry(cfs, truncatedAt,
position), LOCAL_KEY));
-        forceBlockingFlush(LOCAL_CF);
+        if (!Boolean.getBoolean("cassandra.unsafetruncate"))
+            forceBlockingFlush(LOCAL_CF);
     }
 
     /**


Mime
View raw message