Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034201 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2016-10-13 15:05 | 2017-05-25 09:27 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 02c7d99b53e9 | ||||
Projection | none | ETA | none | Target Version | 3.0PR17Q1 | |||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | caristu | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0034201: can't create import entries while changing role organization access | |||||||
Description | Modifying any role's organization access (edit/add/remove) creates contention on import entry, so any new entry created while the transaction doing the modifications is queued till it finishes. This is much more noticeable the bigger the number of roles is in the system. | |||||||
Steps To Reproduce | 1. In an instance with several roles edit any one to grant access to any new organization 2. Meanwhile, create an order from WebPOS -> Realize the import entry to process that order is not created until the role edition has been completed. | |||||||
Proposed Solution | The root cause of the problem is in AD_ROLE_ORGACCESS_TRG: (SELECT * FROM AD_Role FOR UPDATE) [1]. Because import entry has a FK to ad_role, insertions require the transaction to be completed in order the lock to be released. The purpose of this trigger is to update client and org lists in ad_role, but note those two fields are deprecated since 2010 and they are not currently in use. See issue 0014750 So the proposed solution is to completely remove those columns and the trigger. -- [1] https://code.openbravo.com/erp/devel/pi/file/0d765967dc06/src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml#l46 [^] | |||||||
Tags | Performance | |||||||
Attached Files | ![]() | |||||||
![]() |
|||||||||||||||||||||||||||||
|
![]() |
|
(0090921) hgbot (developer) 2016-10-26 13:02 |
Repository: erp/devel/pi Changeset: 02c7d99b53e94e81945da798a3130bb2a0aa192f Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Wed Sep 21 16:39:13 2016 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/02c7d99b53e94e81945da798a3130bb2a0aa192f [^] fixed bug 34201: can't create import entries while changing role org access Removed deprecated client and org list in ad_role because the trigger that kept them in sync was craeting contention for insertions into import entry. --- M src-db/database/model/tables/AD_ROLE.xml M src-db/database/sourcedata/AD_COLUMN.xml M src-db/database/sourcedata/AD_ELEMENT.xml M src-db/database/sourcedata/AD_FIELD.xml M src-test/src/org/openbravo/test/dal/IssuesTest.java M src-test/src/org/openbravo/test/datasource/DataSourceSecurity.java M src-test/src/org/openbravo/test/role/inheritance/RoleInheritanceTestUtils.java M src-test/src/org/openbravo/test/security/ExplicitCrossOrganizationReference.java M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java R src-db/database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml --- |
(0091180) caristu (viewer) 2016-11-04 15:09 |
Reviewed |
(0092579) hudsonbot (viewer) 2016-12-16 18:38 |
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/dc8bf00badd0 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2016-10-13 15:05 | alostale | New Issue | |
2016-10-13 15:05 | alostale | Assigned To | => platform |
2016-10-13 15:05 | alostale | OBNetwork customer | => No |
2016-10-13 15:05 | alostale | Modules | => Core |
2016-10-13 15:05 | alostale | Triggers an Emergency Pack | => No |
2016-10-13 15:07 | alostale | Relationship added | related to 0014750 |
2016-10-13 15:12 | alostale | Proposed Solution updated | |
2016-10-13 15:13 | alostale | Status | new => scheduled |
2016-10-13 15:20 | alostale | File Added: 34201.export | |
2016-10-13 15:20 | alostale | Review Assigned To | => caristu |
2016-10-26 13:01 | alostale | Relationship added | depends on 0034297 |
2016-10-26 13:02 | hgbot | Checkin | |
2016-10-26 13:02 | hgbot | Note Added: 0090921 | |
2016-10-26 13:02 | hgbot | Status | scheduled => resolved |
2016-10-26 13:02 | hgbot | Resolution | open => fixed |
2016-10-26 13:02 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/02c7d99b53e94e81945da798a3130bb2a0aa192f [^] |
2016-11-04 15:09 | caristu | Note Added: 0091180 | |
2016-11-04 15:09 | caristu | Status | resolved => closed |
2016-11-04 15:09 | caristu | Fixed in Version | => 3.0PR17Q1 |
2016-12-16 18:38 | hudsonbot | Checkin | |
2016-12-16 18:38 | hudsonbot | Note Added: 0092579 | |
2016-12-23 07:53 | alostale | Assigned To | platform => alostale |
2017-02-22 08:17 | alostale | Relationship added | related to 0035333 |
2017-05-25 09:27 | alostale | Tag Attached: Performance | |
2017-05-25 09:27 | alostale | Relationship added | causes 0036092 |
Copyright © 2000 - 2009 MantisBT Group |