Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033134 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2016-06-03 17:37 | 2018-01-03 12:39 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | inigosanchez | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR18Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 64d20a56c50a | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033134: ImportEntryProcessor calls initialize() 2 times on OBContext switch causing extra db queries | |||||||
Description | ImportEntryProcessor.setOBContext function has following code: // initialize several things so that they are not initialized // during the processing obContext.getEntityAccessChecker().initialize(); However the getEntityAccessChecker() does either return a already initialized objects. Or it creates a new one and does the initialize() calls itself. So calling initialize() on the result does calls it 2 times. That is bad as the init method has 2 db queries which are thus called double. duration: 0.353 ms execute S_2581/C_2582: select adtab0_.AD_Table_ID as col_0_0_, adwindowac2_.IsReadWrite as col_1_0_ from AD_Tab adtab0_ left outer join AD_Window adwindow1_ on adtab0_.AD_Window_ID=adwindow1_.AD_Window_ID left outer join AD_Window_Access adwindowac2_ on adwindow1_.AD_Window_ID=adwindowac2_.AD_Window_ID where adwindowac2_.AD_Role_ID=$1 duration: 0.010 ms execute S_2583/C_2584: select adtableacc0_.AD_Table_Access_ID as AD1_101_, adtableacc0_.AD_Role_ID as AD2_101_, adtableacc0_.AD_Table_ID as AD3_101_, adtableacc0_.AD_Client_ID as AD4_101_, adtableacc0_.AD_Org_ID as AD5_101_, adtableacc0_.IsActive as IsActive101_, adtableacc0_.Created as Created101_, adtableacc0_.CreatedBy as CreatedBy101_, adtableacc0_.UpdatedBy as UpdatedBy101_, adtableacc0_.Updated as Updated101_, adtableacc0_.IsReadOnly as IsReadOnly101_, adtableacc0_.IsExclude as IsExclude101_, adtableacc0_.Inherited_From as Inherited13_101_ from AD_Table_Access adtableacc0_ where adtableacc0_.AD_Role_ID='29A79A279DC54348B58A2C64891F35AA' 2nd set: duration: 0.322 ms execute S_2585/C_2586: select adtab0_.AD_Table_ID as col_0_0_, adwindowac2_.IsReadWrite as col_1_0_ from AD_Tab adtab0_ left outer join AD_Window adwindow1_ on adtab0_.AD_Window_ID=adwindow1_.AD_Window_ID left outer join AD_Window_Access adwindowac2_ on adwindow1_.AD_Window_ID=adwindowac2_.AD_Window_ID where adwindowac2_.AD_Role_ID=$1 duration: 0.009 ms execute S_2587/C_2588: select adtableacc0_.AD_Table_Access_ID as AD1_101_, adtableacc0_.AD_Role_ID as AD2_101_, adtableacc0_.AD_Table_ID as AD3_101_, adtableacc0_.AD_Client_ID as AD4_101_, adtableacc0_.AD_Org_ID as AD5_101_, adtableacc0_.IsActive as IsActive101_, adtableacc0_.Created as Created101_, adtableacc0_.CreatedBy as CreatedBy101_, adtableacc0_.UpdatedBy as UpdatedBy101_, adtableacc0_.Updated as Updated101_, adtableacc0_.IsReadOnly as IsReadOnly101_, adtableacc0_.IsExclude as IsExclude101_, adtableacc0_.Inherited_From as Inherited13_101_ from AD_Table_Access adtableacc0_ where adtableacc0_.AD_Role_ID='29A79A279DC54348B58A2C64891F35AA' | |||||||
Steps To Reproduce | In install containing webpos. Enable logging of all sql Trigger OrderLoader (make a ticket) Trace SQL logged just before OrderLoader starts it functional work. | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0086997) shuehner (administrator) 2016-06-03 17:38 |
Note: removing initialize makes this line of code looks not useful on first glance. So a code-comment should be added to adjust developer that this line is required and does .initialize() indirectly. |
(0100697) hgbot (developer) 2017-11-24 10:58 |
Repository: erp/devel/pi Changeset: 64d20a56c50aef9567da1c1c781654f13fe9946a Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com> Date: Fri Nov 24 10:55:40 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/64d20a56c50aef9567da1c1c781654f13fe9946a [^] Fixed issue 33134: ImportEntryProcessor calls initialize() two times ImportEntryProcessor was causing extra db queries because it was calling EntityAccessChecker.initialize() two times. In order to fix the problem, it has been removed one of the calls to initialize method. --- M src/org/openbravo/service/importprocess/ImportEntryProcessor.java --- |
(0100735) hgbot (developer) 2017-11-27 11:23 |
Repository: erp/devel/pi Changeset: a2e1574d92e2f9fd4d1a663d1403b337d7be8d55 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Nov 27 11:22:37 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/a2e1574d92e2f9fd4d1a663d1403b337d7be8d55 [^] related to bug 33134: made comment clearer --- M src/org/openbravo/service/importprocess/ImportEntryProcessor.java --- |
(0100736) alostale (manager) 2017-11-27 11:23 |
reviewed + tested |
(0101454) hudsonbot (developer) 2018-01-03 12:39 |
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/c81e0d3cbab5 [^] Maturity status: Test |
(0101459) hudsonbot (developer) 2018-01-03 12:39 |
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/c81e0d3cbab5 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2016-06-03 17:37 | shuehner | New Issue | |
2016-06-03 17:37 | shuehner | Assigned To | => platform |
2016-06-03 17:37 | shuehner | Modules | => Core |
2016-06-03 17:37 | shuehner | Triggers an Emergency Pack | => No |
2016-06-03 17:37 | shuehner | Tag Attached: Performance | |
2016-06-03 17:38 | shuehner | Note Added: 0086997 | |
2016-07-15 09:53 | alostale | Status | new => acknowledged |
2016-07-15 09:53 | alostale | Priority | normal => urgent |
2016-12-01 13:20 | alostale | Priority | urgent => normal |
2016-12-01 14:05 | alostale | Priority | normal => urgent |
2016-12-01 14:05 | alostale | Priority | urgent => high |
2017-05-29 13:31 | shuehner | Relationship added | related to 0035622 |
2017-11-23 10:39 | inigosanchez | Status | acknowledged => scheduled |
2017-11-23 10:39 | inigosanchez | Assigned To | platform => inigosanchez |
2017-11-24 10:50 | inigosanchez | Review Assigned To | => alostale |
2017-11-24 10:58 | hgbot | Checkin | |
2017-11-24 10:58 | hgbot | Note Added: 0100697 | |
2017-11-24 10:58 | hgbot | Status | scheduled => resolved |
2017-11-24 10:58 | hgbot | Resolution | open => fixed |
2017-11-24 10:58 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/64d20a56c50aef9567da1c1c781654f13fe9946a [^] |
2017-11-27 11:23 | hgbot | Checkin | |
2017-11-27 11:23 | hgbot | Note Added: 0100735 | |
2017-11-27 11:23 | alostale | Note Added: 0100736 | |
2017-11-27 11:23 | alostale | Status | resolved => closed |
2017-11-27 11:23 | alostale | Fixed in Version | => 3.0PR18Q1 |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101454 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101459 |
Copyright © 2000 - 2009 MantisBT Group |