rustyrazorblade opened a new issue, #112:
URL: https://github.com/apache/cassandra-easy-stress/issues/112

   ### Summary
   
   The `CreateDrop` workload fails every write. It binds its insert values on a 
statement and then discards the result. Reads and deletes are not affected.
   
   ### Root cause
   
   In 
`src/main/kotlin/org/apache/cassandra/easystress/workloads/CreateDrop.kt`, 
`getNextMutation` does this:
   
   ```kotlin
   val bound = table.insert.bind()
   bound.setString(0, partitionKey.getText())
   for (i in 0 until fields) {
       bound.setString(i + 1, field.getText())
   }
   return Operation.Mutation(bound)
   ```
   
   In driver 4, a `BoundStatement` is immutable, so `setString` returns a new 
statement. The code discards that statement, so every insert goes out with no 
bound values. `getNextSelect` and `getNextDelete` chain the calls 
(`.bind().setString(...)`), so they work.
   
   ### Impact
   
   On a cluster test of #111 (Cassandra 5.0.9, RF 3), a 1-minute `CreateDrop` 
run had 0 successful writes and 305,001 errors in the main phase. Populate 
reported "0 rows written, 1000 rows failed". Before #111, the populate failures 
were hidden by `resetErrors()`.
   
   ### Fix
   
   Keep the result of each `setString`, for example `bound = 
bound.setString(...)`, or build the statement with 
`table.insert.bind(partitionKey.getText(), *values)`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to