You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ja...@apache.org on 2016/11/07 19:10:47 UTC
[2/3] cassandra git commit: Fix cassandra-stress truncate option
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/trunk
Commit: d582d034083d4e39d2206739984369d38518696a
Parents: 2b45673
Author: Alwyn <al...@instaclustr.com>
Authored: Fri Sep 23 16:12:13 2016 +1000
Committer: T Jake Luciani <ja...@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