cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9519) CASSANDRA-8448 Doesn't seem to be fixed
Date Fri, 10 Jul 2015 13:54:04 GMT

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

Sylvain Lebresne commented on CASSANDRA-9519:
---------------------------------------------

bq. My take from the stacktrace was that DES.sortByProximityWithScore was calling super to
AES.sortByProximity which then had a problem with the array changing while being sorted. 

Well, the whole point of {{sortByProximity}} is to sort the list input in place, so if the
caller changes the input behind our back, we have a very serious problem (and a quick scan
of the call site indicates we do no such thing). In fact, your patch break {{sortByProximity}}
plain and simple since it make it sort a local copy of the list that nobody ever gets (and
the list that should be sorted isn't).

Besides, the error message strongly suggests the problem is with the comparison method.

bq. It would be nice if we had a test that could reproduce this so we don't have to play guessing
games

It's actually not all that hard. I've push on [my branch|https://github.com/pcmanus/cassandra/commits/9519]
a test that on my box fail pretty reliably without the patch but haven't failed with it


> CASSANDRA-8448 Doesn't seem to be fixed
> ---------------------------------------
>
>                 Key: CASSANDRA-9519
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9519
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Jeremiah Jordan
>             Fix For: 2.1.x, 2.2.x
>
>         Attachments: 9519.txt
>
>
> Still seeing the "Comparison method violates its general contract!" in 2.1.5
> {code}
> java.lang.IllegalArgumentException: Comparison method violates its general contract!
> 	at java.util.TimSort.mergeHi(TimSort.java:895) ~[na:1.8.0_45]
> 	at java.util.TimSort.mergeAt(TimSort.java:512) ~[na:1.8.0_45]
> 	at java.util.TimSort.mergeCollapse(TimSort.java:437) ~[na:1.8.0_45]
> 	at java.util.TimSort.sort(TimSort.java:241) ~[na:1.8.0_45]
> 	at java.util.Arrays.sort(Arrays.java:1512) ~[na:1.8.0_45]
> 	at java.util.ArrayList.sort(ArrayList.java:1454) ~[na:1.8.0_45]
> 	at java.util.Collections.sort(Collections.java:175) ~[na:1.8.0_45]
> 	at org.apache.cassandra.locator.AbstractEndpointSnitch.sortByProximity(AbstractEndpointSnitch.java:49)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithScore(DynamicEndpointSnitch.java:158)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithBadness(DynamicEndpointSnitch.java:187)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximity(DynamicEndpointSnitch.java:152)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.service.StorageProxy.getLiveSortedEndpoints(StorageProxy.java:1530)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:1688) ~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:256)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:209)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:63)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:238)
~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:260) ~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> 	at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:272) ~[cassandra-all-2.1.5.469.jar:2.1.5.469]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message