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

Jonathan Ellis commented on CASSANDRA-864:
------------------------------------------

What's happening is, we're relying on the synchronization done by the caller of 
response() to make us thread-safe.  And this works fine _if_ responses arrive 
before the timeout; then the assumption that responses are never added after 
the wait in get completes holds true (since no responses may be added after the 
signal is fired).

But if the request times out, then the signal has not actually been fired, and 
a response may arrive during iteration of the messages and cause a CME, as seen 
here.

> ConcurrentModificationException during QuorumResponseHandler
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-864
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-864
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6
>            Reporter: B. Todd Burruss
>            Assignee: Jonathan Ellis
>
> using cassandra-0.6.0-beta2/
> 2010-03-09 09:17:26,827 ERROR [pool-1-thread-675] [Cassandra.java:1166] 
> Internal error processing get
> java.util.ConcurrentModificationException
>         at 
> java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
>         at java.util.AbstractList$Itr.next(AbstractList.java:343)
>         at 
> org.apache.cassandra.service.QuorumResponseHandler.get(QuorumResponseHandler.java:68)
>         at 
> org.apache.cassandra.service.StorageProxy.strongRead(StorageProxy.java:470)
>         at 
> org.apache.cassandra.service.StorageProxy.readProtocol(StorageProxy.java:401)
>         at 
> org.apache.cassandra.thrift.CassandraServer.readColumnFamily(CassandraServer.java:101)
>         at 
> org.apache.cassandra.thrift.CassandraServer.multigetInternal(CassandraServer.java:309)
>         at 
> org.apache.cassandra.thrift.CassandraServer.get(CassandraServer.java:274)
>         at 
> org.apache.cassandra.thrift.Cassandra$Processor$get.process(Cassandra.java:1156)
>         at 
> org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:1114)
>         at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to