[
https://issues.apache.org/jira/browse/TINKERPOP-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107052#comment-15107052
]
ASF GitHub Bot commented on TINKERPOP-1089:
-------------------------------------------
GitHub user okram opened a pull request:
https://github.com/apache/incubator-tinkerpop/pull/204
TINKERPOP-1089: Order.shuffle implementation is too fragile
https://issues.apache.org/jira/browse/TINKERPOP-1089
This required some refactoring. We have lots of `Comparator` wrappers
everywhere so things get a little nasty. However, I added some solid test cases
that ensure that the order violation doesn't happen with `Order.shuffle`.
VOTE +1.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-tinkerpop TINKERPOP-1089
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-tinkerpop/pull/204.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #204
----
commit ed66ee3e027787a6c95c7ee9d5d1b09c155ed093
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-01-19T17:36:56Z
fixed Order.shuffle so that it doesn't violate contract. This required some
refactoring. A little cleaner, but I bet we could make it even nicer.
----
> Order.shuffle implementation is too fragile
> -------------------------------------------
>
> Key: TINKERPOP-1089
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1089
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.0.2-incubating
> Reporter: Daniel Kuppitz
> Assignee: Marko A. Rodriguez
> Fix For: 3.1.1-incubating
>
>
> {code}
> __((1..100).toList()).order(local).by(shuffle)
> {code}
> Try that query often enough and it will fail. You can increase the likeliness
> of a failure by increasing the size of the list. An explanation of why that
> happens is given here:
> http://stackoverflow.com/questions/19325256/java-lang-illegalargumentexception-comparison-method-violates-its-general-contr
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)