Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026818Openbravo ERPA. Platformpublic2014-06-09 18:242014-09-02 09:29
shuehner 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
3.0PR14Q43.0PR14Q4 
marvintm
Core
No
0026818: new fk-batching code in dbsm behaves wrong when having at least 1 fk which cannot be enabled (on postgresql)
This bug is known to happen on postgresql.
Unknown if it also applies to oracle.

Some time ago code for dropping + re-enabling foreign keys inside update.database was changed to use jdbc-batching (to improve performance).

That code contains fallback to non-batching in case of any fk failing to enable (because of non-conforming data).

Idea was -> fast with batching if all fk's are fine
fall back to be slow if now (slow not so important as should not happen frequently in practice).

Now it is noticed that the fallback is not working properly.

If you have a fk failing to enable in postgres then update.db does show error message about a different fk which is completely unrelated to user.

That is happening frequently in CI (every 1-2 weeks at least) + also at least in one client.

AMO has a patch in progress which should fix it but this needs more work.
-
No tags attached.
Issue History
2014-06-09 18:24shuehnerNew Issue
2014-06-09 18:24shuehnerAssigned To => AugustoMauch
2014-06-09 18:24shuehnerModules => Core
2014-06-09 18:24shuehnerTriggers an Emergency Pack => No
2014-06-20 14:49alostaleTarget VersionPR14Q3 => PR14Q4
2014-07-24 12:30jonalegriaesarteResolution time => 1407967200
2014-08-07 15:19AugustoMauchIssue Monitored: marvintm
2014-08-07 15:20AugustoMauchReview Assigned To => marvintm
2014-08-07 15:20hgbotCheckin
2014-08-07 15:20hgbotNote Added: 0069114
2014-08-07 15:20hgbotCheckin
2014-08-07 15:20hgbotNote Added: 0069115
2014-08-07 15:20hgbotStatusnew => resolved
2014-08-07 15:20hgbotResolutionopen => fixed
2014-08-07 15:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/09161e69861377accfb61ef9afdbfb912115c3c2 [^]
2014-08-07 15:20hgbotStatusnew => resolved
2014-08-08 18:54hudsonbotCheckin
2014-08-08 18:54hudsonbotNote Added: 0069269
2014-09-02 09:29marvintmStatusresolved => closed
2014-09-02 09:29marvintmFixed in Version => 3.0PR14Q4

Notes
(0069114)
hgbot   
2014-08-07 15:20   
Repository: erp/devel/pi
Changeset: 09161e69861377accfb61ef9afdbfb912115c3c2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 07 15:19:21 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/09161e69861377accfb61ef9afdbfb912115c3c2 [^]

Fixes issue 26818: Handles properly a failure when applying a batch

Changes done for PostgreSQL:
- The Connection will not autocommit when evaluating a batch
- If a batch fails, the connection does a rollback, sets the autoCommit to true, and evaluates the sql commands in a non-batched connection.

Changes dsone for Oracle:
- If a batch fails, the sql commands of the batch that have not been executed yet will be executed in a non-batched connection

---
M src-db/database/lib/dbsourcemanager.jar
---
(0069115)
hgbot   
2014-08-07 15:20   
Repository: erp/devel/pi
Changeset: 09161e69861377accfb61ef9afdbfb912115c3c2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Aug 07 15:19:21 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/09161e69861377accfb61ef9afdbfb912115c3c2 [^]

Fixes issue 26818: Handles properly a failure when applying a batch

Changes done for PostgreSQL:
- The Connection will not autocommit when evaluating a batch
- If a batch fails, the connection does a rollback, sets the autoCommit to true, and evaluates the sql commands in a non-batched connection.

Changes dsone for Oracle:
- If a batch fails, the sql commands of the batch that have not been executed yet will be executed in a non-batched connection

---
M src-db/database/lib/dbsourcemanager.jar
---
(0069269)
hudsonbot   
2014-08-08 18:54   
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/4450016dee64 [^]
Maturity status: Test