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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034201
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2016-10-13 15:052017-05-25 09:27
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q1
StatusclosedFix in branchFixed in SCM revision02c7d99b53e9
ProjectionnoneETAnoneTarget Version3.0PR17Q1
OSAnyDatabasePostgreSQLJava 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

0034201: can't create import entries while changing role organization access

DescriptionModifying 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 Reproduce1. 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 SolutionThe 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 [^]
TagsPerformance
Attached Files? file icon 34201.export [^] (22,601 bytes) 2016-10-13 15:20

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00147502.50MP23 closedadrianromero I can not access to the application when there are many organizations. 
depends on defect 0034297 closedalostale api change: removed CLIENTLIST and ORGLIST from AD_ROLE 
related to defect 0035333 closedvmromanos Build error in RR17Q1 with latest Improved Balance Sheet and P&L Structure Report version (1.0.0) 
causes defect 0036092 closedalostale Failed to apply roles dataset 

-  Notes
(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 (developer)
2016-11-04 15:09

Reviewed
(0092579)
hudsonbot (developer)
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

- Issue History
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 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
Powered by Mantis Bugtracker