ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Medvedev (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-9235) Transitivity violation in GridMergeIndex Comparator
Date Wed, 08 Aug 2018 12:58:00 GMT
Andrew Medvedev created IGNITE-9235:
---------------------------------------

             Summary: Transitivity violation in GridMergeIndex Comparator
                 Key: IGNITE-9235
                 URL: https://issues.apache.org/jira/browse/IGNITE-9235
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.5
            Reporter: Andrew Medvedev


Currently comparator is

 

private final Comparator<RowStream> streamCmp = new Comparator<RowStream>() {
 @Override public int compare(RowStream o1, RowStream o2) {
 // Nulls at the beginning.
 if (o1 == null)
 return -1;

 if (o2 == null)
 return 1;

 return compareRows(o1.get(), o2.get());
 }
};

 

 

This comparator violates transitivity when both RowStream are null. Thus we get excetption
in JDK1.8:

 

 

 

 

WA: use -Djava.util.Arrays.useLegacyMergeSort=true

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message