Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037681 | Openbravo ERP | A. Platform | public | 2018-01-19 10:27 | 2018-03-02 21:18 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037681: No need to create the ad_context_info table if audit trail is not active, remove Update Audit Trail Infrastructure. |
Description | The ad_context_info table is used by the audit trail triggers to retrieve the user id, process type and process id related with each captured change.
If the option to activate audit trail without recompiling and restarting tomcat is removed, then it would be possible to create the ad_context_info table only if audit trail was active when Tomcat was started. This would make the connection creation lighter. |
Steps To Reproduce | - |
Proposed Solution | 1 - Remove the Update Audit Trail Infrastructure process, so that users have to rebuild Openbravo and restore Tomcat in order to create the Audit Trail triggers
2 - Do not create the ad_context_info temporary table if there were no audited tables when Tomcat was started. |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0037677 | | closed | AugustoMauch | No need to check if ad_context_info table exists before creating it | related to | defect | 0037818 | | closed | AugustoMauch | API Change: UpdateAuditTrail process has been removed |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2018-01-19 10:27 | AugustoMauch | New Issue | |
2018-01-19 10:27 | AugustoMauch | Assigned To | => AugustoMauch |
2018-01-19 10:27 | AugustoMauch | Modules | => Core |
2018-01-19 10:27 | AugustoMauch | Triggers an Emergency Pack | => No |
2018-01-19 10:28 | AugustoMauch | Relationship added | related to 0037677 |
2018-01-29 10:30 | alostale | Tag Attached: Performance | |
2018-02-01 13:14 | hgbot | Checkin | |
2018-02-01 13:14 | hgbot | Note Added: 0102117 | |
2018-02-01 13:14 | hgbot | Status | new => resolved |
2018-02-01 13:14 | hgbot | Resolution | open => fixed |
2018-02-01 13:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b42f32f0e0e9093fe8a9b7ba99eba0b2bbdc2a7e [^] |
2018-02-01 13:14 | AugustoMauch | Review Assigned To | => caristu |
2018-02-02 10:01 | AugustoMauch | Relationship added | related to 0037818 |
2018-02-02 10:35 | AugustoMauch | Note Added: 0102148 | |
2018-02-12 17:17 | caristu | Note Added: 0102339 | |
2018-02-12 17:17 | caristu | Status | resolved => new |
2018-02-12 17:17 | caristu | Resolution | fixed => open |
2018-02-12 17:17 | caristu | Note Edited: 0102339 | bug_revision_view_page.php?bugnote_id=0102339#r16674 |
2018-02-14 10:40 | hgbot | Checkin | |
2018-02-14 10:40 | hgbot | Note Added: 0102393 | |
2018-02-14 10:40 | hgbot | Checkin | |
2018-02-14 10:40 | hgbot | Note Added: 0102394 | |
2018-02-14 10:40 | hgbot | Checkin | |
2018-02-14 10:40 | hgbot | Note Added: 0102395 | |
2018-02-14 10:40 | hgbot | Status | new => resolved |
2018-02-14 10:40 | hgbot | Resolution | open => fixed |
2018-02-14 10:40 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/b42f32f0e0e9093fe8a9b7ba99eba0b2bbdc2a7e [^] => http://code.openbravo.com/erp/devel/pi/rev/d0a6cc5b94d57859c9d80bb03bc43f71ce8ec94a [^] |
2018-02-22 18:18 | hudsonbot | Checkin | |
2018-02-22 18:18 | hudsonbot | Note Added: 0102706 | |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102755 | |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102756 | |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102757 | |
2018-02-28 19:57 | caristu | Note Added: 0102880 | |
2018-02-28 19:57 | caristu | Status | resolved => closed |
2018-02-28 19:57 | caristu | Fixed in Version | => 3.0PR18Q2 |
2018-03-01 11:34 | hgbot | Checkin | |
2018-03-01 11:34 | hgbot | Note Added: 0102902 | |
2018-03-02 21:18 | hudsonbot | Checkin | |
2018-03-02 21:18 | hudsonbot | Note Added: 0102961 | |
Notes |
|
(0102117)
|
hgbot
|
2018-02-01 13:14
|
|
Repository: erp/devel/pi
Changeset: b42f32f0e0e9093fe8a9b7ba99eba0b2bbdc2a7e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Jan 19 13:42:17 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b42f32f0e0e9093fe8a9b7ba99eba0b2bbdc2a7e [^]
Fixes issue 37681: Dont create ad_context_info if audit trail not active
Records are only read/written from the ad_context_info if audit trail is enabled (if any ad_table is fully audited). If audit trail is disabled when
Tomcat is started, there is no need to create the ad_context_info table each time that a new connection is created. From now on it will no be possible
to enable the audit trail while Tomcat is active, enabling it will require to rebuild Openbravo and to restart Tomcat. Now:
- The Update Audit Trail Infrastructure has been removed
- When a new table is set to be audited in the AD, SessionInfo.setAuditTrailActive(true) will not be invoked, so that the isAuditTrailActive flag can
only be set to true when Tomcat starts.
---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java
M src-core/src/org/openbravo/database/SessionInfo.java
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_PROCESS.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_TableAudit.java
R src/org/openbravo/erpCommon/ad_process/UpdateAuditTrail.java
---
|
|
|
|
|
|
|
|
|
(0102393)
|
hgbot
|
2018-02-14 10:40
|
|
Repository: erp/devel/pi
Changeset: 7c00470a19e9fbf2f56ab45945b27d65e54c82be
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 14 10:15:36 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7c00470a19e9fbf2f56ab45945b27d65e54c82be [^]
Related with issue 37681: Dont call to setAuditActive(false) in SL_TableAudit
The SL_TableAudit callout is invoked when changing the value of the Is Fully Audited flag in ad_table. When the user set this flag to false to the only table that was
being audited, the callout was invoking SessionInfo.setAuditActive(false); to notify that there were no more tables being audited.
But this can lead to problems. Suppose:
- There is one table audited, the audit trail triggers are installed
- All connections have created the ad_context_info table because of this
- The user sets to false the Is Fully Audited flag of the audited table and invokes SessionInfo.setAuditActive(false);
- From then on new connections will not create the ad_context_info table. But the triggers are still installed in the table, because the audit trail infrastructure is not
updated until the system is rebuilt and restarted. If there is a change in data of that table and the connection in charge of doing it has not created the ad_context_info,
the change will not be commited because the triggers will fail.
---
M src/org/openbravo/erpCommon/ad_callouts/SL_TableAudit.java
---
|
|
|
(0102394)
|
hgbot
|
2018-02-14 10:40
|
|
Repository: erp/devel/pi
Changeset: 19cd3ba5708f51f807253f34152d3a7a44d8ff7d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 14 10:21:20 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/19cd3ba5708f51f807253f34152d3a7a44d8ff7d [^]
Related with issue 37681: Fixes typo in message, adds comment
---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java
M src-db/database/sourcedata/AD_MESSAGE.xml
---
|
|
|
(0102395)
|
hgbot
|
2018-02-14 10:40
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code reviewed + tested OK. |
|
|
(0102902)
|
hgbot
|
2018-03-01 11:34
|
|
Repository: erp/devel/pi
Changeset: 1b9efd28dc913c45d3f5ae84a201e4c7a1e06134
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Mar 01 11:32:50 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1b9efd28dc913c45d3f5ae84a201e4c7a1e06134 [^]
related to issue 37681: fix typo in comment
---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java
---
|
|
|
|
|