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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037358
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-11-22 12:432018-01-03 12:39
ReportershuehnerView Statuspublic 
Assigned Toinigosanchez 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revisionb8fc412fa8bf
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037358: Avoid query to AttributeData.selectOrgCurrency during login if system does not have any accounting schema.

DescriptionThe following code is from LoginUtils.fillSessionArguments running during login.

It is running always and internally using ad_isorgincluded which can be slow after its recent refactor.
      // set organization currency
      orgCurrency = AttributeData.selectOrgCurrency(conn, strOrg, strCliente);

But the only usage later in this file is:
        if (attr != null && attr.length > 0) {
          vars.setSessionValue("$C_AcctSchema_ID", attr[0].value);
          if (orgCurrency.length > 0) {
            vars.setSessionValue("$C_Currency_ID", orgCurrency[0].cCurrencyId);

With attr being result of query to c_acctschema so only done if the system does at least have 1 accounting schema.

In cases where customer does not have any accounting schema that we could skip the selectOrgCurrencyQuery completely just my moving the call into the attr != null if.
Steps To Reproduce-
TagsPerformance
Attached Filesdiff file icon loginutils-skip_ad_isorgincluded-without-accounting.diff [^] (1,133 bytes) 2017-11-22 14:47 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0035553 closedcaristu Improve scalability of the login process 

-  Notes
(0100666)
shuehner (administrator)
2017-11-22 14:49

Note patch is for older 16Q1 release, so probably does not apply cleanly on tip. However checking manually same should be easily doable in latest code.
(0100699)
hgbot (developer)
2017-11-24 11:29

Repository: erp/devel/pi
Changeset: b8fc412fa8bf926dcde5fc8da7c2de6b5c4ffada
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Nov 24 11:28:10 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b8fc412fa8bf926dcde5fc8da7c2de6b5c4ffada [^]

Fixed issue 37358: Avoid a query during login under some circumstances

Avoid query to AttributeData.selectOrgCurrency during login if system does not have any
accounting schema. In cases where customer does not have any accounting schema that we
could skip the selectOrgCurrency query completely. To take into account this improvement,
it is moved the AttributeData.selectOrgCurrency call.

Besides it is applied format properly to several comments.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0100725)
alostale (manager)
2017-11-27 10:05

reviewed
(0101456)
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
2017-11-22 12:43 shuehner New Issue
2017-11-22 12:43 shuehner Assigned To => platform
2017-11-22 12:43 shuehner Modules => Core
2017-11-22 12:43 shuehner Triggers an Emergency Pack => No
2017-11-22 12:43 shuehner Tag Attached: Performance
2017-11-22 14:38 alostale Status new => acknowledged
2017-11-22 14:38 alostale Priority normal => urgent
2017-11-22 14:47 shuehner File Added: loginutils-skip_ad_isorgincluded-without-accounting.diff
2017-11-22 14:49 shuehner Note Added: 0100666
2017-11-22 14:52 shuehner Relationship added related to 0035553
2017-11-23 10:38 inigosanchez Status acknowledged => scheduled
2017-11-23 10:38 inigosanchez Assigned To platform => inigosanchez
2017-11-24 11:14 inigosanchez Review Assigned To => alostale
2017-11-24 11:29 hgbot Checkin
2017-11-24 11:29 hgbot Note Added: 0100699
2017-11-24 11:29 hgbot Status scheduled => resolved
2017-11-24 11:29 hgbot Resolution open => fixed
2017-11-24 11:29 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b8fc412fa8bf926dcde5fc8da7c2de6b5c4ffada [^]
2017-11-27 10:05 alostale Note Added: 0100725
2017-11-27 10:05 alostale Status resolved => closed
2017-11-27 10:05 alostale Fixed in Version => 3.0PR18Q1
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101456


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker