Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034061Openbravo ERPA. Platformpublic2016-09-22 16:562016-12-16 18:38
NaroaIriarte 
NaroaIriarte 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q1 
alostale
No
Core
No
0034061: The cascade constraints deletion should be more restrictive
The cascade constraint deletion must be restricted.
Now when an update database is done, every FK constraint to AD tables is deleted and after these are regenerated again. This causes a performance issue in some circumstances and should be fixed.
 
.
The constraint deletion must be restricted.
The FK constraints to AD tables must be drop only when there are actually changes in the referenced AD table.
No tags attached.
related to defect 0037592 closed platform update.database hangs if one module has a column in a table that's in another module not installed 
Issue History
2016-09-22 16:56NaroaIriarteNew Issue
2016-09-22 16:56NaroaIriarteAssigned To => platform
2016-09-22 16:56NaroaIriarteOBNetwork customer => No
2016-09-22 16:56NaroaIriarteModules => Core
2016-09-22 16:56NaroaIriarteTriggers an Emergency Pack => No
2016-09-22 16:57NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-09-22 16:58NaroaIriarteStatusnew => acknowledged
2016-09-22 16:58NaroaIriarteStatusacknowledged => scheduled
2016-11-04 12:34NaroaIriarteReview Assigned To => alostale
2016-11-04 13:00hgbotCheckin
2016-11-04 13:00hgbotNote Added: 0091171
2016-11-04 13:00hgbotStatusscheduled => resolved
2016-11-04 13:00hgbotResolutionopen => fixed
2016-11-04 13:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a4743d84d014f3648ee97b432ce33074866f45b7 [^]
2016-11-11 09:06alostaleSummaryThe cascade constraints deletion shoul be more restrictive => The cascade constraints deletion should be more restrictive
2016-11-11 09:07alostaleNote Added: 0091372
2016-11-11 09:07alostaleStatusresolved => closed
2016-11-11 09:07alostaleFixed in Version => 3.0PR17Q1
2016-12-16 18:38hudsonbotCheckin
2016-12-16 18:38hudsonbotNote Added: 0092596
2018-01-19 12:07alostaleRelationship addedrelated to 0037592

Notes
(0091171)
hgbot   
2016-11-04 13:00   
Repository: erp/devel/pi
Changeset: a4743d84d014f3648ee97b432ce33074866f45b7
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Fri Nov 04 12:58:24 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a4743d84d014f3648ee97b432ce33074866f45b7 [^]

Fixed issue 34061: The drop of the constraints is now more restrictive

The ant update database task has been modified to be more restrictive when droping the constraints and deleting rows. Before this project it was done for every FK constrainst to AD tabes. And after that every of them where regenerated. This caused performance issues.
Now, it is only done when deletion or insertion changes are detected, and for those tables which are affected.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0091372)
alostale   
2016-11-11 09:07   
code reviewed and tested as part of project http://wiki.openbravo.com/wiki/Projects:Support_Partial_Indexes_On_Nullable_Columns [^]
(0092596)
hudsonbot   
2016-12-16 18:38   
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/dc8bf00badd0 [^]
Maturity status: Test