Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019855Openbravo ERPY. DBSourceManagerpublic2012-02-23 17:132012-03-02 15:39
marvintm 
marvintm 
normalmajoralways
closedfixed 
5
 
3.0MP9 
Core
No
0019855: Under very specific circumstances, update.database can fail due to a Comparator error
The ChangeComparator in dbsourcemanager (in the DataComparator class) is not perfectly-transitive. Therefore, it can fail under some specific circumstances with an error similar to this:

 [java] 307486 INFO - Comparing databases to find differences
     [java] java.lang.IllegalArgumentException: Comparison method violates its general contract!
     [java] at java.util.TimSort.mergeLo(TimSort.java:747)
     [java] at java.util.TimSort.mergeAt(TimSort.java:483)
     [java] at java.util.TimSort.mergeCollapse(TimSort.java:410)
     [java] at java.util.TimSort.sort(TimSort.java:214)
     [java] at java.util.TimSort.sort(TimSort.java:173)
     [java] at java.util.Arrays.sort(Arrays.java:659)
     [java] at java.util.Collections.sort(Collections.java:217)
     [java] at org.apache.ddlutils.alteration.DataComparator.compareToUpdate(DataComparator.java:121)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:182)
     [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:38)
The way to reproduce this issue is not clear currently. It has previously happened to some customers, but we don't have a reliable way to reproduce it now.
No tags attached.
Issue History
2012-02-23 17:13marvintmNew Issue
2012-02-23 17:13marvintmAssigned To => marvintm
2012-02-23 17:13marvintmModules => Core
2012-02-23 17:40hgbotCheckin
2012-02-23 17:40hgbotNote Added: 0045418
2012-02-23 17:40hgbotStatusnew => resolved
2012-02-23 17:40hgbotResolutionopen => fixed
2012-02-23 17:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/334833f4c3a7927d855c61f66516cd27efbb2587 [^]
2012-02-24 11:27hgbotCheckin
2012-02-24 11:27hgbotNote Added: 0045439
2012-02-24 11:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/334833f4c3a7927d855c61f66516cd27efbb2587 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/dc38e73dea5a433238e3bbb98f1552264f7955dc [^]
2012-02-28 08:38alostaleNote Added: 0045494
2012-02-28 08:38alostaleStatusresolved => closed
2012-02-28 08:38alostaleFixed in Version => 3.0MP9
2012-03-02 15:39hudsonbotCheckin
2012-03-02 15:39hudsonbotNote Added: 0045944

Notes
(0045418)
hgbot   
2012-02-23 17:40   
Repository: erp/devel/pi
Changeset: 334833f4c3a7927d855c61f66516cd27efbb2587
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 23 17:32:29 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/334833f4c3a7927d855c61f66516cd27efbb2587 [^]

Fixed issue 19855. Comparator is now consistent and transitive. Fixed issue 13724. Dataset information will now be loaded from the database instead of the XML files.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0045439)
hgbot   
2012-02-24 11:27   
Repository: erp/devel/dbsm-main
Changeset: dc38e73dea5a433238e3bbb98f1552264f7955dc
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 23 17:15:13 2012 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/dc38e73dea5a433238e3bbb98f1552264f7955dc [^]

Fixed issue 19855. DataComparator now is consistent and transitive.

---
M src/org/apache/ddlutils/alteration/DataComparator.java
---
(0045494)
alostale   
2012-02-28 08:38   
This issue was reported because it was failing in a concrete instance. After applying the fix, this instance built successfully.
(0045944)
hudsonbot   
2012-03-02 15:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/544d64e0c159 [^]

Maturity status: Test