Fix cassandra-stress truncate option

Patch by Alwyn Davis; reviewed by tjake for CASSANDRA-12695
This commit is contained in:
Alwyn 2016-09-23 16:12:13 +10:00 committed by T Jake Luciani
parent 2b45673131
commit d582d03408
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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