[ 
https://issues.apache.org/jira/browse/CASSANDRA-13998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16458489#comment-16458489
 ] 

Venkata Harikrishna Nukala commented on CASSANDRA-13998:
--------------------------------------------------------

This is the issue with UUID generation. UUID is generated with same MSB (most 
significant bits) and LSB (least significant bits). Because of this, the XOR of 
MSB and LSB is always zero. _PartitionIterator.seed(Object object, AbstractType 
type, long seed)_ is using the _MSB ^ LSB_ to generate the idSeed which is 
always zero and the initial value of idSeed is zero too. This idSeed is used as 
the seed for value columns too. Since the seed is same (zero) all the time, 
same values with the same size are being generated. So fixed UUID generation 
using FasterRandom.

After this change, I can see data generated with different size & values. 
Tested with a table having clustering columns and different types of primary 
keys.

Attaching the patch to this ticket.

> Cassandra stress distribution does not affect the result
> --------------------------------------------------------
>
>                 Key: CASSANDRA-13998
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13998
>             Project: Cassandra
>          Issue Type: Task
>          Components: Stress
>         Environment: Widnows 10
>            Reporter: Mikhail Pliskovsky
>            Assignee: Venkata Harikrishna Nukala
>            Priority: Trivial
>             Fix For: 3.11.x
>
>         Attachments: cqlstress-example.yaml
>
>
> When testing my schema on single-node cluster, I am getting the identical 
> data for each stress-test run
> I specify my cassandra-stress.yaml file 
> Table and column spec
> {code:java}
> table_definition: |
>   CREATE TABLE files (
>     id uuid PRIMARY KEY,
>     data blob
>   ) 
> columnspec:
>   - name: data
>     size: UNIFORM(10..100)
>     population: UNIFORM(1..100B)
> {code}
> But when query table rows after test, I am getting data as identical string 
> in each row
> Command to run the test
> {code:java}
> cassandra-stress user profile=..\cqlstress-example.yaml n=20 ops(insert=5) 
> -rate threads=8
> {code}
> What I am doing wrong? 
> My wish is to have the data of variable length



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to