Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035493Openbravo ERPY. DBSourceManagerpublic2017-03-13 09:172017-03-17 08:52
alostale 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR17Q2 
caristu
Core
Pre packaging ( pi )
2017-01-11
pi
https://code.openbravo.com/erp/devel/pi/rev/47c768943f70d1c674cb0a2701faf29edde3da84 [^]
No
0035493: missing log info when check consistency fails
When exporting database, PL code is checked to ensure it is consistently exported. When there are inconsistencies it only logs some basic info, but it misses the actual problems.

The problem is caused because export.database uses OBLogAppender to log information. This class stores the information about where to log in ThreadLocals, now check consistency is performed in different threads, so the logs generated from these other threads are not displayed.
1. Set core in development
2. Do modifications to some PL to force to be inconsistently exported:
  * ie. change
      IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
    to lower case
      IF tg_op = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF;
3. Export database
  Check the log doesn't indicate the differences you'd get.
It does not make sense anymore to continue using OBLogAppender for export.datbase: replace it with a standard ConsoleAppender.
No tags attached.
related to defect 0035492 closed alostale error checking pl consistency 
related to defect 0035490 closed shuehner SystemService logValidationResults logs a ERROR line always if there are no errors (shows in export.database) 
caused by feature request 00346543.0PR17Q2 closed alostale some performance improvements in DBSM tasks 
related to design defect 0035503 acknowledged Triage Platform Base tomcat pool can't be used in cli tasks 
diff 35493-2.diff (862) 2017-03-13 12:10
https://issues.openbravo.com/file_download.php?file_id=10558&type=bug
diff 35493-1.diff (1,348) 2017-03-13 12:11
https://issues.openbravo.com/file_download.php?file_id=10559&type=bug
Issue History
2017-03-13 09:17alostaleNew Issue
2017-03-13 09:17alostaleAssigned To => platform
2017-03-13 09:17alostaleModules => Core
2017-03-13 09:17alostaleTriggers an Emergency Pack => No
2017-03-13 09:17alostaleRelationship addedrelated to 0035492
2017-03-13 09:17alostaleRelationship addedrelated to 0035490
2017-03-13 09:59alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14778#r14778
2017-03-13 10:00alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14779#r14779
2017-03-13 12:04alostaleRelationship addedcaused by 0034654
2017-03-13 12:05alostaleRegression level => Pre packaging ( pi )
2017-03-13 12:05alostaleRegression date => 2017-01-11
2017-03-13 12:05alostaleRegression introduced in release => pi
2017-03-13 12:05alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/47c768943f70d1c674cb0a2701faf29edde3da84 [^]
2017-03-13 12:05alostalePrioritynormal => immediate
2017-03-13 12:05alostaleSeveritymajor => minor
2017-03-13 12:05alostaleReview Assigned To => caristu
2017-03-13 12:06alostaleAssigned Toplatform => alostale
2017-03-13 12:06alostaleStatusnew => acknowledged
2017-03-13 12:09alostaleDescription Updatedbug_revision_view_page.php?rev_id=14781#r14781
2017-03-13 12:09alostaleProposed Solution updated
2017-03-13 12:10alostaleFile Added: 35493-1.diff
2017-03-13 12:10alostaleFile Added: 35493-2.diff
2017-03-13 12:11alostaleFile Deleted: 35493-1.diff
2017-03-13 12:11alostaleFile Added: 35493-1.diff
2017-03-13 14:10shuehnerIssue Monitored: shuehner
2017-03-14 09:16alostaleRelationship addedrelated to 0035503
2017-03-14 09:23hgbotCheckin
2017-03-14 09:23hgbotNote Added: 0094989
2017-03-14 09:23hgbotStatusacknowledged => resolved
2017-03-14 09:23hgbotResolutionopen => fixed
2017-03-14 09:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7e2800bad2ba3ea0f9a48cc28f661e81ba2460ce [^]
2017-03-14 09:23hgbotCheckin
2017-03-14 09:23hgbotNote Added: 0094990
2017-03-14 09:25hgbotCheckin
2017-03-14 09:25hgbotNote Added: 0094993
2017-03-14 09:25hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/7e2800bad2ba3ea0f9a48cc28f661e81ba2460ce [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/2c18bf970368346a63be240ae4bdfa720c40abfc [^]
2017-03-15 20:22hudsonbotCheckin
2017-03-15 20:22hudsonbotNote Added: 0095295
2017-03-15 20:22hudsonbotCheckin
2017-03-15 20:22hudsonbotNote Added: 0095296
2017-03-17 08:52caristuNote Added: 0095352
2017-03-17 08:52caristuStatusresolved => closed
2017-03-17 08:52caristuFixed in Version => 3.0PR17Q2

Notes
(0094989)
hgbot   
2017-03-14 09:23   
Repository: erp/devel/pi
Changeset: 7e2800bad2ba3ea0f9a48cc28f661e81ba2460ce
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Mar 14 09:21:07 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7e2800bad2ba3ea0f9a48cc28f661e81ba2460ce [^]

fixed bug 35492, fixed bug 35493: new dbsm

  Includes:
    * 35492 - Fixes PG trigger translation consistency:
               - incorrect casting from Trigger to Function
               - use correct translator for triggers
    * 35493 - Missing log info in export.database:
               - replaced OBLogAppender which is not required by standard
                 ConsoleAppender
               - changed layout so that time and log level (INFO, WARN...) is
                 displayed

---
M src-db/database/lib/dbsourcemanager.jar
---
(0094990)
hgbot   
2017-03-14 09:23   
Repository: erp/devel/pi
Changeset: afcca1baf74cece5355d02eab7f97188b5b4f022
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Mar 14 09:22:54 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/afcca1baf74cece5355d02eab7f97188b5b4f022 [^]

related to issue 35493, related to issue 35503

  Don't display warn message when tomcat pool cannot be used unless log level is
  set to debug.

  It is expected not to be possible to use it from CLI, because now export.database
  uses standard ConsoleAppender, this message was now visible in logs.

---
M src/org/openbravo/dal/core/SessionHandler.java
---
(0094993)
hgbot   
2017-03-14 09:25   
Repository: erp/devel/dbsm-main
Changeset: 2c18bf970368346a63be240ae4bdfa720c40abfc
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 13 14:08:29 2017 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/2c18bf970368346a63be240ae4bdfa720c40abfc [^]

fixed bug 35493: missing log info when check consistency fails

  Using now standard ConsoleAppender for logging instead of OBLogAppender which
  does not handle properly logging in multi-thread.

---
M src/org/openbravo/ddlutils/task/BaseDalInitializingTask.java
---
(0095295)
hudsonbot   
2017-03-15 20:22   
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/54e102bef53e [^]
Maturity status: Test
(0095296)
hudsonbot   
2017-03-15 20:22   
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/54e102bef53e [^]
Maturity status: Test
(0095352)
caristu   
2017-03-17 08:52   
Code reviewed + testing OK: differences can be seen now in the log.