[ https://issues.apache.org/jira/browse/CASSANDRA-18337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caleb Rackliffe updated CASSANDRA-18337: ---------------------------------------- Reviewers: Caleb Rackliffe, Caleb Rackliffe Caleb Rackliffe, Caleb Rackliffe (was: Caleb Rackliffe) Status: Review In Progress (was: Patch Available) > 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: 10m > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org