cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-5382) ConcurrentModificantionException on server when multiple CQL3 read requests received on single column family simultaneously.
Date Tue, 26 Mar 2013 11:45:15 GMT


Sylvain Lebresne updated CASSANDRA-5382:

    Attachment: 0001-Copy-ResultSet-in-makeCountResult.txt

>From a quick check the only place I see the metadata list being modified after Metadata
creation is in makeCountResult. Even if I've missed another spot, not copying in makeCountResult
was bad so attaching a simple patch to fix that.
> ConcurrentModificantionException on server when multiple CQL3 read requests received
on single column family simultaneously.
> ----------------------------------------------------------------------------------------------------------------------------
>                 Key: CASSANDRA-5382
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.3
>         Environment: SLES, Sun JDK 1.6.0_43
>            Reporter: Jason Reber
>            Priority: Minor
>         Attachments: 0001-Copy-ResultSet-in-makeCountResult.txt
> The exception below is thrown on the server when two reads are performed at the exact
same time on the same column family. This causes the query to fail. 
> The problem appears to be caused by the 'name' list in org.apache.cassandra.cql3.ResultSet$Metadata.
The reference is passed in to the constructor and iterated without copying and without a synch
block. When two of these ResultSet instances are created from the same metadata list at the
same time, a ConcurrentModificationException is thrown.
> The error:
> ERROR [Thrift:860] 2013-03-25 09:27:39,467 (line 217) Error
occurred during processing of message.
> java.util.ConcurrentModificationException
>         at java.util.AbstractList$Itr.checkForComodification(
>         at java.util.AbstractList$
>         at org.apache.cassandra.cql3.ResultSet$Metadata.allInSameCF(
>         at org.apache.cassandra.cql3.ResultSet$Metadata.<init>(
>         at org.apache.cassandra.cql3.ResultSet.<init>(
>         at org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.<init>(
>         at org.apache.cassandra.cql3.statements.Selection$ResultSetBuilder.<init>(
>         at org.apache.cassandra.cql3.statements.Selection.resultSetBuilder(
>         at org.apache.cassandra.cql3.statements.SelectStatement.process(
>         at org.apache.cassandra.cql3.statements.SelectStatement.processResults(
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(
>         at org.apache.cassandra.cql3.QueryProcessor.processPrepared(
>         at org.apache.cassandra.thrift.CassandraServer.execute_prepared_cql3_query(
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_prepared_cql3_query.getResult(
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_prepared_cql3_query.getResult(
>         at org.apache.thrift.ProcessFunction.process(
>         at org.apache.thrift.TBaseProcessor.process(
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
>         at java.util.concurrent.ThreadPoolExecutor$
>         at

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message