curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cameron McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-115) delayeddistributedqueue failed to sort children
Date Thu, 19 Jun 2014 04:10:24 GMT

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

Cameron McKenzie commented on CURATOR-115:
------------------------------------------

Also seems likely that this has not been noticed before because Curator is built against Java
6, and the TimSort implementation of Collections.sort() didn't come in until Java 7 (I think).
So, this would not be an issue. As a work around, you can set the java.util.Arrays.useLegacyMergeSort
system property to "true", and it will use a merge sort which silently ignores these inconsistencies.

> delayeddistributedqueue failed to sort children
> -----------------------------------------------
>
>                 Key: CURATOR-115
>                 URL: https://issues.apache.org/jira/browse/CURATOR-115
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.4.2
>         Environment: linux, jdk 7
>            Reporter: kimi
>
> i have a delayeddistributed queues to store some jobs, on startup, sometimes this issue
come up:
> recipes.queue.DistributedDelayQueue$1-QueueBuilder-5 [ERROR] Exception caught in background
handler
> java.lang.IllegalArgumentException: Comparison method violates its general contract!
>         at java.util.TimSort.mergeLo(TimSort.java:747)
>         at java.util.TimSort.mergeAt(TimSort.java:483)
>         at java.util.TimSort.mergeCollapse(TimSort.java:408)
>         at java.util.TimSort.sort(TimSort.java:214)
>         at java.util.TimSort.sort(TimSort.java:173)
>         at java.util.Arrays.sort(Arrays.java:659)
>         at java.util.Collections.sort(Collections.java:217)
>         at org.apache.curator.framework.recipes.queue.DistributedDelayQueue$1.sortChildren(DistributedDelayQueue.java:89)
>         at org.apache.curator.framework.recipes.queue.DistributedQueue.runLoop(DistributedQueue.java:551)
>         at org.apache.curator.framework.recipes.queue.DistributedQueue.access$000(DistributedQueue.java:65)
>         at org.apache.curator.framework.recipes.queue.DistributedQueue$1.call(DistributedQueue.java:196)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         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)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message