For CASSANDRA-2893 and other scenarios we'd like to generate non-unique rows to insert. (Maybe we can re-use the same pseudorandom distribution code we already have for reads.)
new option L (-non-uniq-rows) added.
I used -L in https://issues.apache.org/jira/browse/CASSANDRA-2268 (patches will be along shortly) for --enable-cql. Are there any other short options we could use for this?
I understand I'm coming a little late, but I actually remembered that for counters we've introduced the -F option, that allows to specify how many different keys to use. In other word, stress -n 10000 -F 1 will do 10000 insertion on the same row. Maybe that could actually be enough for generating artificial contention ?
how does it distribute updates across rows if n > F?
It uses a modulo on the 'operation number', so with say -F 3, the producer will generate inserts for keys 0, 1, 2, 0, 1, 2, etc... So it's a bit dumb, but by varying the number of threads, I believe you can control a bit the level of contention (typically, -F 1 means every writes are contending, but say -F 5 with 10 threads means less contention, and then -F 8 with 10 threads even less).
I overlooked -F option and it seems that -F 1 is the behavior we want in this case.