You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stacktrace is:
Caused by: java.lang.IllegalArgumentException: Comparison method violates its
general contract!
at java.util.TimSort.mergeLo(TimSort.java:747) [rt.jar:1.7.0_71]
at java.util.TimSort.mergeAt(TimSort.java:483) [rt.jar:1.7.0_71]
at java.util.TimSort.mergeCollapse(TimSort.java:410) [rt.jar:1.7.0_71]
at java.util.TimSort.sort(TimSort.java:214) [rt.jar:1.7.0_71]
at java.util.TimSort.sort(TimSort.java:173) [rt.jar:1.7.0_71]
at java.util.Arrays.sort(Arrays.java:659) [rt.jar:1.7.0_71]
at java.util.Collections.sort(Collections.java:217) [rt.jar:1.7.0_71]
at com.googlecode.cqengine.resultset.connective.ResultSetIntersection.<init>(ResultSetIntersection.java:41) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl.retrieveRecursive(QueryEngineImpl.java:330) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl$2$1.next(QueryEngineImpl.java:351) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl$2$1.next(QueryEngineImpl.java:333) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.resultset.connective.ResultSetIntersection.<init>(ResultSetIntersection.java:38) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl.retrieveRecursive(QueryEngineImpl.java:330) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl$2$1.next(QueryEngineImpl.java:351) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl$2$1.next(QueryEngineImpl.java:333) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.resultset.connective.ResultSetIntersection.<init>(ResultSetIntersection.java:38) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl.retrieveRecursive(QueryEngineImpl.java:330) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.engine.impl.QueryEngineImpl.retrieve(QueryEngineImpl.java:241) [cqengine-1.3.2.jar:]
at com.googlecode.cqengine.collection.impl.ConcurrentIndexedCollection.retrieve(ConcurrentIndexedCollection.java:79) [cqengine-1.3.2.jar:]
It's hard to reproduce, but it looks like it's happening when one thread is
executing a query at the same time another thread is modifying the
ConcurrentIndexedCollection. The simple workaround is to add
-Djava.util.Arrays.useLegacyMergeSort=true to revert back to the pre-Java 7
mergesort that silently ignored Comparators that broke the contract, however,
it would probably be better to somehow take a snapshot of the size of the
underlying Set (or whatever other method is being used to determine the merge
cost for a particular ResultSet) so it can't change during the sort.
Further discussion here:
https://groups.google.com/forum/#!topic/cqengine-discuss/dixsmISmbx8
Original issue reported on code.google.com by bkr...@tapheaven.com on 7 Apr 2015 at 2:38
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
bkr...@tapheaven.com
on 7 Apr 2015 at 2:38The text was updated successfully, but these errors were encountered: