[
https://issues.apache.org/jira/browse/CASSANDRA-18337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701386#comment-17701386
]
Caleb Rackliffe commented on CASSANDRA-18337:
---------------------------------------------
+1 (assuming an uneventful rebase and test run)
> Operations.migrateReadRequiredOperations fails due to concurrent access when
> TransactionStatement is prepared
> -------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-18337
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18337
> Project: Cassandra
> Issue Type: Bug
> Components: Accord
> Reporter: David Capwell
> Assignee: David Capwell
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {code}
> java.util.NoSuchElementException
> at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1000)
> at
> org.apache.cassandra.cql3.Operations.migrateReadRequiredOperations(Operations.java:71)
> at
> org.apache.cassandra.cql3.Operations.migrateReadRequiredOperations(Operations.java:63)
> at
> org.apache.cassandra.cql3.statements.ModificationStatement.getTxnWriteFragment(ModificationStatement.java:828)
> at
> org.apache.cassandra.cql3.statements.TransactionStatement.createWriteFragments(TransactionStatement.java:290)
> at
> org.apache.cassandra.cql3.statements.TransactionStatement.createUpdate(TransactionStatement.java:309)
> at
> org.apache.cassandra.cql3.statements.TransactionStatement.createTxn(TransactionStatement.java:334)
> at
> org.apache.cassandra.cql3.statements.TransactionStatement.execute(TransactionStatement.java:375)
> {code}
> this was caused by having shared mutable state! when we start creating the
> txn objects we would also mutate the mutations that had operations that need
> to be run in the txn, this has an issue when the txn is run from prepared
> statements as the object is shared by multiple threads, causing the array to
> be mutated while iterating.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]