Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037681
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminorhave not tried2018-01-19 10:272018-03-02 21:18
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revisiond0a6cc5b94d5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037681: No need to create the ad_context_info table if audit trail is not active, remove Update Audit Trail Infrastructure.

DescriptionThe 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 Solution1 - 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.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0037677 closedAugustoMauch No need to check if ad_context_info table exists before creating it 
related to defect 0037818 closedAugustoMauch API Change: UpdateAuditTrail process has been removed 

-  Notes
(0102117)
hgbot (developer)
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
---
(0102148)
AugustoMauch (developer)
2018-02-02 10:35

The wiki has been updated: The wiki has been udpated: http://wiki.openbravo.com/wiki/Audit_Trail#Running_the_.27Update_Audit_Trail_infrastructure_process [^]
(0102339)
caristu (developer)
2018-02-12 17:17
edited on: 2018-02-12 17:17

Reopened: setting isAuditActive to false from the SL_TableAudit callout can lead to an inconsistent state.

See: https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]

(0102393)
hgbot (developer)
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 (developer)
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 (developer)
2018-02-14 10:40

Repository: erp/devel/pi
Changeset: d0a6cc5b94d57859c9d80bb03bc43f71ce8ec94a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Feb 14 10:37:25 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d0a6cc5b94d57859c9d80bb03bc43f71ce8ec94a [^]

Fixes issue 37681: Message is shown when enabling and disabling audit trail

---
M src/org/openbravo/erpCommon/ad_callouts/SL_TableAudit.java
---
(0102706)
hudsonbot (developer)
2018-02-22 18:18

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102755)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102756)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102757)
hudsonbot (developer)
2018-02-22 18:19

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/980a6ad5bbf5 [^]
Maturity status: Test
(0102880)
caristu (developer)
2018-02-28 19:57

Code reviewed + tested OK.
(0102902)
hgbot (developer)
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
---
(0102961)
hudsonbot (developer)
2018-03-02 21:18

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/05dece3dc80b [^]
Maturity status: Test

- 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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker