Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011377Openbravo ERPA. Platformpublic2009-11-16 15:122009-11-19 00:00
shuehner 
shuehner 
normalmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0011377: Make DAL use inside dbsourcemanager more resilient to a unclean database state.
If a update.database run was interrupted, i.e. because of some failure then the AD_* table can be in some inconsistent state.

Example a foreign key field (i.e. ad_tab.ad_table_id) might contain some uuid where the target primary key does not exists (the ad_table entry with this value).

As DAL by default uses AD_Table,... for access control DAL startup fails and thus update.database cannot be used to 'repair' the database state.

But the automatic dal-access control in dbsourcemanager is not needed for the update.database run. Disabling it lets dal start with these inconsistent db-state and thus update.database can be run again to 'repair' the db and continue working.
Hard, as it requires a broken db-instance with this symptoms...
Disable automatic access-control earlier in dbsourcemanager when running in adminmode (meaning all rights are granted) so ad_* tables are not even read for the checks.
No tags attached.
Issue History
2009-11-16 15:12shuehnerNew Issue
2009-11-16 15:12shuehnerAssigned To => shuehner
2009-11-17 12:31hgbotCheckin
2009-11-17 12:31hgbotNote Added: 0021917
2009-11-17 12:31hgbotStatusnew => resolved
2009-11-17 12:31hgbotResolutionopen => fixed
2009-11-17 12:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f87cf399296ff28713b92f02245ca9e768df26c2 [^]
2009-11-18 14:27mtaalNote Added: 0021970
2009-11-18 14:27mtaalStatusresolved => closed
2009-11-19 00:00anonymoussf_bug_id0 => 2900165

Notes
(0021917)
hgbot   
2009-11-17 12:31   
Repository: erp/devel/pi
Changeset: f87cf399296ff28713b92f02245ca9e768df26c2
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Nov 17 12:30:36 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f87cf399296ff28713b92f02245ca9e768df26c2 [^]

Fixed 11377: Disable dal access checks in adminmode earlier
This makes the dal use in dbsourcemanager more resilient to an unclean db-state

---
M src/org/openbravo/dal/service/OBCriteria.java
M src/org/openbravo/dal/service/OBDal.java
M src/org/openbravo/dal/service/OBQuery.java
M src/org/openbravo/dal/xml/EntityXMLConverter.java
---
(0021970)
mtaal   
2009-11-18 14:27   
reviewed