[ https://issues.apache.org/jira/browse/CASSANDRA-7964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204084#comment-14204084 ]
Robert Stupp commented on CASSANDRA-7964: ----------------------------------------- One bug and a couple of minors. Stress tool cannot read anymore (NPE) - e.g. with {{tools/bin/cassandra-stress user profile=tools/cqlstress-example.yaml 'ops(insert=1,simple1=9)'}}. * the line {{switch (seek(isWrite ? position : null))}} in {{org.apache.cassandra.stress.generate.PartitionIterator.MultiRowIterator#reset}} implicitly uses unnecessary boxing - it produces an NPE on reads. Beside that it would be great if the TODO regarding the repopulation of the queue(s) would be implemented (feels expensive) * {{org.apache.cassandra.stress.Operation#ready}} has a {{while}}-loop which is effectively a {{for}}-loop - if written as a for-loop, makes the code a bit easier to read - e.g. {code} int i = 0; for (; i < partitionCount; i++) { {code} * in {{org.apache.cassandra.stress.generate.PartitionIterator.MultiRowIterator#fill(java.util.Queue<java.lang.Object>, int, org.apache.cassandra.stress.generate.values.Generator)}} ({{SHUFFLED}}) you call {{ThreadLocalRandom.current()}}, but the instance field {{random}} already contains an instance to it * the line {{this.hasNext = hasNext;}} in {{org.apache.cassandra.stress.generate.PartitionIterator.MultiRowIterator#setHasNext}} should be moved to the beginning of the method and {{this.hasNext = false;}} removed * the method {{org.apache.cassandra.stress.operations.userdefined.SchemaInsert#spec}} seems useless - unlike the {{spec}} in {{SchemaQuery}}, which could be {{private}} * missing license header in {{WorkManager.java}}, {{DynamicList.jara}} * {{PartitionIterator.java}} (new file) has {{//}} has class javadoc - should use {{/**}}. Same applies to the (static) inner classes and the fields/methods * {{Operation.java}} commented (no longer used) fields should be removed form the source * {{org.apache.cassandra.stress.settings.SettingsCommandPreDefinedMixed#getFactory}} has new, unused parameter {{seedManager}} * Unused methods: {{org.apache.cassandra.stress.operations.predefined.CqlOperation.CqlRunOpFetchKeys}}, {{org.apache.cassandra.stress.generate.PartitionIterator.MultiRowIterator#setLimit(int[], int)}}, {{org.apache.cassandra.stress.generate.PartitionIterator.MultiRowIterator#compare}} * Unused imports in {{org.apache.cassandra.stress.operations.predefined.PredefinedOperation}}, {{org.apache.cassandra.stress.operations.predefined.ThriftInserter}}, {{org.apache.cassandra.stress.operations.predefined.ThriftReader}}, {{org.apache.cassandra.stress.operations.userdefined.SchemaInsert}}, {{org.apache.cassandra.stress.operations.userdefined.SchemaQuery}}, {{org.apache.cassandra.stress.operations.userdefined.SchemaStatement}}, {{org.apache.cassandra.stress.operations.SampledOpDistribution}}, {{org.apache.cassandra.stress.operations.SampledOpDistributionFactory}}, {{org.apache.cassandra.stress.settings.SettingsCommandPreDefined}}, {{org.apache.cassandra.stress.settings.SettingsCommandPreDefinedMixed}}, {{org.apache.cassandra.stress.settings.SettingsCommandUser}}, {{org.apache.cassandra.stress.Operation}}, {{org.apache.cassandra.stress.StressAction}}, {{org.apache.cassandra.stress.generate.PartitionGenerator}}, not from this ticket, but confusing: * {{org.apache.cassandra.stress.operations.predefined.CqlOperation}} has type parameter {{V}} but inner classes also use {{V}} has a different type parameter > cassandra-stress over schema should support multiple simultaneous inserts > over the same seed > -------------------------------------------------------------------------------------------- > > Key: CASSANDRA-7964 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7964 > Project: Cassandra > Issue Type: Improvement > Components: Tools > Reporter: Benedict > Assignee: Benedict > Priority: Minor > > This constraint makes testing contention essentially impossible -- This message was sent by Atlassian JIRA (v6.3.4#6332)