o.a.c.stress.Operation will retry queries a configurable number of times. When the "user" command is invoked the o.a.c.stress.operations.userdefined SchemaInsert and SchemaQuery operations are used.
When SchemaInsert and SchemaQuery are retried (eg after a Read/WriteTimeout exception), they advance the PartitionIterator used to generate the keys to insert/query (SchemaInsert.java:85 SchemaQuery.java:129) This means each retry will use a different set of keys.
The predefined set of operations avoid this problem by packaging up the arguments to bind to the query into the RunOp object so that retrying the operation results in exactly the same query with the same arguments being run.
This problem was introduced by
CASSANDRA-7964. Prior to CASSANDRA-7964 the PartitionIterator (Partition.RowIterator before the change) was reinitialized prior to each query retry, thus generating the same set of keys each time.
This problem is reported rather confusingly. The only error that shows up in a log file (specified with -log file=foo.log) is the unhelpful
Standard error is only slightly more helpful, displaying the ignorable initial read/write error, and confusing java.util.NoSuchElementException lines (caused by PartitionIterator exhaustion) followed by the above IOException with stack trace, eg