cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Stepura (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-6629) Coordinator's "java.lang.ArrayIndexOutOfBoundsException: -1" with CL > 1
Date Tue, 28 Jan 2014 21:21:32 GMT

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

Mikhail Stepura edited comment on CASSANDRA-6629 at 1/28/14 9:19 PM:
---------------------------------------------------------------------

It looks like {{remove}} at {{org.apache.cassandra.db.ArrayBackedSortedColumns.ReverseSortedCollection.iterator}}
should use _idx_ (current item)  instead of _idx--_ (next item)

{code:title=Current implementation which throws ArrayIndexOutOfBoundsException}
            return new Iterator<Column>()
            {
                int idx = size() - 1;

                public boolean hasNext()
                {
                    return idx >= 0;
                }

                public Column next()
                {
                    return columns.get(idx--);
                }

                public void remove()
                {
                    columns.remove(idx--);
                }
{code}


was (Author: mishail):
It looks like {{remove}} at {{org.apache.cassandra.db.ArrayBackedSortedColumns.ReverseSortedCollection.iterator}}
should use _idx_ (current item)  rather than _idx--_ (next item)

{code:title=Current implementation which throws ArrayIndexOutOfBoundsException}
            return new Iterator<Column>()
            {
                int idx = size() - 1;

                public boolean hasNext()
                {
                    return idx >= 0;
                }

                public Column next()
                {
                    return columns.get(idx--);
                }

                public void remove()
                {
                    columns.remove(idx--);
                }
{code}

> Coordinator's "java.lang.ArrayIndexOutOfBoundsException: -1" with CL > 1
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6629
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6629
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: 15 nodes, 2.0.4, RF=3
>            Reporter: Roman Skvazh
>
> I've got this error in system.log on all coordinators
> {noformat}
> ERROR [Thrift:37555] 2014-01-28 19:53:51,547 CustomTThreadPoolServer.java (line 212)
Error occurred during processing of message.
> java.lang.ArrayIndexOutOfBoundsException: -1
>         at java.util.ArrayList.elementData(ArrayList.java:400)
>         at java.util.ArrayList.remove(ArrayList.java:477)
>         at org.apache.cassandra.db.ArrayBackedSortedColumns$ReverseSortedCollection$1.remove(ArrayBackedSortedColumns.java:373)
>         at org.apache.cassandra.db.filter.SliceQueryFilter.trim(SliceQueryFilter.java:249)
>         at org.apache.cassandra.db.SliceFromReadCommand.maybeTrim(SliceFromReadCommand.java:101)
>         at org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1370)
>         at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1189)
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:188)
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:163)
>         at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:58)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:188)
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:222)
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:212)
>         at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>         at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> {noformat}
> It's occurred on coordinator (not always primary or secondary of this uid-PK) when I
execute query (PHP or Python client got "TSocket read 0 bytes" exception):
> {code:sql}SELECT * FROM home_timeline WHERE uid = 0x52dcbc794989a6ea2c8b4569 ORDER BY
tuuid DESC LIMIT 32{code}
> If limit < 32, then its ok. When ORDER ... ASC its ok. When ConsistencyLevel 1 its
ok.
> On one node data is inconsistent with two others, and read repair won't work (32-nd element
is odd).
> Our RF = 3
> Cassandra version 2.0.4



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message