cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [1/3] cassandra git commit: Fix cassandra-stress truncate option
Date Mon, 07 Nov 2016 19:10:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.X 2b4567313 -> d582d0340
  refs/heads/trunk c47d395d8 -> 459946aee


Fix cassandra-stress truncate option

Patch by Alwyn Davis; reviewed by tjake for CASSANDRA-12695


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

Branch: refs/heads/cassandra-3.X
Commit: d582d034083d4e39d2206739984369d38518696a
Parents: 2b45673
Author: Alwyn <alwyn@instaclustr.com>
Authored: Fri Sep 23 16:12:13 2016 +1000
Committer: T Jake Luciani <jake@apache.org>
Committed: Mon Nov 7 14:09:06 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d582d034/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1123553..bdb6e29 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.10
+ * Fix cassandra-stress truncate option (CASSANDRA-12695)
  * Fix crossNode value when receiving messages (CASSANDRA-12791)
  * Don't load MX4J beans twice (CASSANDRA-12869)
  * Extend native protocol request flags, add versions to SUPPORTED, and introduce ProtocolVersion
enum (CASSANDRA-12838)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d582d034/tools/stress/src/org/apache/cassandra/stress/StressAction.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
index eaee752..30f8899 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -62,7 +62,8 @@ public class StressAction implements Runnable
         if (!settings.command.noWarmup)
             warmup(settings.command.getFactory(settings));
 
-        if (settings.command.truncate == SettingsCommand.TruncateWhen.ONCE)
+        if ((settings.command.truncate == SettingsCommand.TruncateWhen.ONCE) ||
+            ((settings.rate.threadCount != -1) && (settings.command.truncate == SettingsCommand.TruncateWhen.ALWAYS)))
             settings.command.truncateTables(settings);
 
         // Required for creating a graph from the output file


Mime
View raw message