mirror of https://github.com/apache/cassandra
Cassandra stress user defined writes should populate sequentially
Patch by tjake; reviewed by Benedict for CASSANDRA-8524
This commit is contained in:
parent
9775a9c680
commit
29ff2d26f8
|
|
@ -1,4 +1,5 @@
|
|||
2.1.3
|
||||
* Stress - user defined writes should populate sequentally (CASSANDRA-8524)
|
||||
* Fix regression in SSTableRewriter causing some rows to become unreadable
|
||||
during compaction (CASSANDRA-8429)
|
||||
* Run major compactions for repaired/unrepaired in parallel (CASSANDRA-8510)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ public class SettingsCommandUser extends SettingsCommand
|
|||
throw new IllegalArgumentException("Must specify at least one command with a non-zero ratio");
|
||||
}
|
||||
|
||||
public boolean hasInsertOnly()
|
||||
{
|
||||
return ratios.size() == 1 && ratios.containsKey("insert");
|
||||
}
|
||||
|
||||
public OpDistributionFactory getFactory(final StressSettings settings)
|
||||
{
|
||||
final SeedManager seeds = new SeedManager(settings);
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ public class SettingsPopulation implements Serializable
|
|||
String[] params = clArgs.remove("-pop");
|
||||
if (params == null)
|
||||
{
|
||||
if (command instanceof SettingsCommandUser && ((SettingsCommandUser)command).hasInsertOnly())
|
||||
{
|
||||
return new SettingsPopulation(new SequentialOptions(defaultLimit));
|
||||
}
|
||||
|
||||
// return defaults:
|
||||
switch(command.type)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue