cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-7873) java.util.ConcurrentModificationException seen after selecting from system_auth
Date Thu, 04 Sep 2014 03:31:51 GMT


Benedict updated CASSANDRA-7873:
    Attachment: 7873.txt

I don't think we changed to synchronized(List) for performance; as far as I recall we made
an arbitrary choice between the two on merge (I can't find mention of it on JIRA though).
In 2.1 we're using CLQ, I think there was a different merge conflict against trunk. We should
probably normalise the two. Looking at it, both are fine and acceptable and we're unlikely
to measure any difference, however if we stick with CLQ we should calculate its size only
once in RowDataResolver.resolve() (instead of 4 times).

The difference is CLQ will avoid some random thread parking which will slightly help latency
on a small percentage of runs (almost certainly lost in the noise), whereas synchronized(List)
will guarantee constant time size-of-response calculation. But this will usually be small
enough to likely be imperceptible.

Another option is to use the attached patch, which provides a simple non-blocking collection
that has the optimal characteristics on all of these fronts.

> java.util.ConcurrentModificationException seen after selecting from system_auth
> -------------------------------------------------------------------------------
>                 Key: CASSANDRA-7873
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: OSX and Ubuntu 14.04
>            Reporter: Philip Thompson
>             Fix For: 3.0
>         Attachments: 7873.txt
> The dtest is failing on trunk
only with the following stack trace:
> {code}
> Unexpected error in node1 node log:
> ERROR [Thrift:1] 2014-09-03 15:48:08,389 - Error occurred
during processing of message.
> java.util.ConcurrentModificationException: null
> 	at java.util.ArrayList$Itr.checkForComodification( ~[na:1.7.0_65]
> 	at java.util.ArrayList$ ~[na:1.7.0_65]
> 	at org.apache.cassandra.service.RowDigestResolver.resolve(
> 	at org.apache.cassandra.service.RowDigestResolver.resolve(
> 	at org.apache.cassandra.service.ReadCallback.get( ~[main/:na]
> 	at org.apache.cassandra.service.AbstractReadExecutor.get(
> 	at org.apache.cassandra.service.StorageProxy.fetchRows( ~[main/:na]
> 	at ~[main/:na]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(
> 	at org.apache.cassandra.auth.Auth.selectUser( ~[main/:na]
> 	at org.apache.cassandra.auth.Auth.isExistingUser( ~[main/:na]
> 	at org.apache.cassandra.service.ClientState.login( ~[main/:na]
> 	at org.apache.cassandra.thrift.CassandraServer.login( ~[main/:na]
> 	at org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(
> 	at org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(
> 	at org.apache.thrift.ProcessFunction.process( ~[libthrift-0.9.1.jar:0.9.1]
> 	at org.apache.thrift.TBaseProcessor.process( ~[libthrift-0.9.1.jar:0.9.1]
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker( [na:1.7.0_65]
> 	at java.util.concurrent.ThreadPoolExecutor$ [na:1.7.0_65]
> 	at [na:1.7.0_65]
> {code}
> That exception is thrown when the following query is sent:
> {code}
> """SELECT strategy_options
>                           FROM system.schema_keyspaces
>                           WHERE keyspace_name = 'system_auth'"""
> {code}
> The test alters the RF of the system_auth keyspace, then shuts down and restarts the

This message was sent by Atlassian JIRA

View raw message