Openbravo Issue Tracking System - Modules
View Issue Details
0039328ModulesAnalyticspublic2018-09-20 12:422019-03-28 14:56
JONHM 
AtulOpenbravo 
highmajoralways
closedfixed 
5
 
 
dmiguelez
0039328: Analytics should not have referential integrity with transactional data
Analytics should not have referential integrity. Hibernate loads the children associations that are marked as delete cascade when deleting a parent.
Some of the consequences:
- Deletes are slower
- Cannot have a database with the analytics tables only
- Need indexes so the database size is increased

-
No tags attached.
related to defect 0039329 closed dmiguelez Modules Deleting an order on an environment with analytics installed is slower 
related to feature request 0040302 acknowledged Triage Platform Base Openbravo ERP Make white list extendable from extenal modules for database validation 
? factsDB (122,571) 2018-09-20 12:47
https://issues.openbravo.com/file_download.php?file_id=12162&type=bug
Issue History
2018-09-20 12:42JONHMNew Issue
2018-09-20 12:42JONHMAssigned To => platform
2018-09-20 12:42JONHMResolution time => 1539208800
2018-09-20 12:47JONHMFile Added: factsDB
2018-09-20 12:58JONHMRelationship addedrelated to 0039329
2018-09-21 07:43alostaleAssigned Toplatform => Triage Finance
2018-10-04 13:11SandrahuguetReview Assigned To => Sandrahuguet
2018-10-04 13:11SandrahuguetNote Added: 0107156
2018-10-04 13:11SandrahuguetStatusnew => closed
2018-10-04 13:11SandrahuguetResolutionopen => no change required
2019-02-22 13:09dmiguelezNote Added: 0110034
2019-02-22 13:09dmiguelezStatusclosed => new
2019-02-22 13:09dmiguelezResolutionno change required => open
2019-02-22 13:09dmiguelezResolution time1539208800 => 1552604400
2019-02-22 13:10SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2019-02-26 08:30dmiguelezNote Added: 0110077
2019-02-27 12:28AtulOpenbravoStatusnew => scheduled
2019-02-28 20:00AtulOpenbravoRelationship addedrelated to 0040302
2019-03-05 11:46dmiguelezNote Added: 0110223
2019-03-05 11:47hgbotCheckin
2019-03-05 11:47hgbotNote Added: 0110224
2019-03-05 11:47hgbotCheckin
2019-03-05 11:47hgbotNote Added: 0110225
2019-03-05 11:47hgbotStatusscheduled => resolved
2019-03-05 11:47hgbotResolutionopen => fixed
2019-03-05 11:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/34a0b0030a81698ddb2623ef16fe83b8e3284e0b [^]
2019-03-05 11:47hgbotCheckin
2019-03-05 11:47hgbotNote Added: 0110226
2019-03-05 11:47hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/34a0b0030a81698ddb2623ef16fe83b8e3284e0b [^] => http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/bced16249a139de1bcd69ca94a4b0a97744050d7 [^]
2019-03-05 11:47hgbotCheckin
2019-03-05 11:47hgbotNote Added: 0110227
2019-03-05 11:47hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/bced16249a139de1bcd69ca94a4b0a97744050d7 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.analytics/rev/ddb90b1709774e7892aa11f7638f6fa886ebdea1 [^]
2019-03-05 11:48dmiguelezReview Assigned ToSandrahuguet => dmiguelez
2019-03-05 11:48dmiguelezNote Added: 0110228
2019-03-05 11:48dmiguelezStatusresolved => closed
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110845

Notes
(0107156)
Sandrahuguet   
2018-10-04 13:11   
this is no an issue, the real issue is:
https://issues.openbravo.com/view.php?id=39329 [^]
(0110034)
dmiguelez   
2019-02-22 13:09   
Having Foreign Keys in Fact tables is not necessary and it makes the insertion of the data slow.

Remove the foreign keys for the Fact tables to improve performance.

The tables affected are:
  - From org.openbravo.client.analytics:
    - obanaly_fact_discounts
    - obanaly_fact_order
    - obanaly_fact_salesordheader
  - From org.openbravo.retail.analytics:
    - obretan_fact_sessions
(0110077)
dmiguelez   
2019-02-26 08:30   
From org.openbravo.financial.dimensionalpandlreport:
  - OBDPL_FACT_ACCT_PL
(0110223)
dmiguelez   
2019-03-05 11:46   
Note: Tested in client environment
(0110224)
hgbot   
2019-03-05 11:47   
Repository: erp/devel/pi
Changeset: 46a06da3a17ae0b6b8105a4a6bccfe06718ebe16
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Mar 01 13:37:14 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/46a06da3a17ae0b6b8105a4a6bccfe06718ebe16 [^]

Related To Issue 39328:Analytics should not have referential
integrity with transactional data

** Add tables to white list to avoid fk checks to avoid warnings
during export database task obanaly_fact_discounts,
obanaly_fact_order, obanaly_fact_salesordheader, obretan_fact_sessions
and obdpl_fact_acct_pl
** Added existing ignored table ad_module_install in the white list

---
M src/org/openbravo/service/system/DatabaseValidator.java
---
(0110225)
hgbot   
2019-03-05 11:47   
Repository: erp/pmods/org.openbravo.client.analytics
Changeset: 34a0b0030a81698ddb2623ef16fe83b8e3284e0b
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 27 16:40:54 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.client.analytics/rev/34a0b0030a81698ddb2623ef16fe83b8e3284e0b [^]

Fixes Issue 0039328: Analytics should not have referential integrity with
transactional data

**Remove Foriegn Keys from table
**OBANALY_FACT_DISCOUNTS.xml
**OBANALY_FACT_ORDER
**OBANALY_FACT_SALESORHEADER

---
M src-db/database/model/tables/OBANALY_FACT_DISCOUNTS.xml
M src-db/database/model/tables/OBANALY_FACT_ORDER.xml
M src-db/database/model/tables/OBANALY_FACT_SALESORDHEADER.xml
---
(0110226)
hgbot   
2019-03-05 11:47   
Repository: erp/pmods/org.openbravo.financial.dimensionalpandlreport
Changeset: bced16249a139de1bcd69ca94a4b0a97744050d7
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 27 16:45:43 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.financial.dimensionalpandlreport/rev/bced16249a139de1bcd69ca94a4b0a97744050d7 [^]

Fixes Issue 0039328: Analytics should not have referential integrity
with transactional data

**Remove Foriegn Keys from table OBDPL_FACT_ACCT_PL

---
M src-db/database/model/tables/OBDPL_FACT_ACCT_PL.xml
---
(0110227)
hgbot   
2019-03-05 11:47   
Repository: erp/pmods/org.openbravo.retail.analytics
Changeset: ddb90b1709774e7892aa11f7638f6fa886ebdea1
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Feb 27 16:44:54 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.analytics/rev/ddb90b1709774e7892aa11f7638f6fa886ebdea1 [^]

Fixes Issue 0039328: Analytics should not have referential integrity
with transactional data

**Remove Foriegn Keys from table OBRETAN_FACT_SESSIONS
**Remove Foriegn Keys from client analytics module tables

---
M src-db/database/model/modifiedTables/OBANALY_FACT_DISCOUNTS.xml
M src-db/database/model/modifiedTables/OBANALY_FACT_ORDER.xml
M src-db/database/model/modifiedTables/OBANALY_FACT_SALESORDHEADER.xml
M src-db/database/model/tables/OBRETAN_FACT_SESSIONS.xml
---
(0110228)
dmiguelez   
2019-03-05 11:48   
Code Review + Testing Ok
(0110845)
hudsonbot   
2019-03-28 14:56   
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/b2fbc1588df4 [^]
Maturity status: Test