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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036636
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-08-10 16:122017-09-21 16:49
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision64c98f878ddb
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

0036636: new DalConnectionProvider() causes double flush in 1 case

DescriptionUsing that constructor or DalConnectionProvider(true) requests a flush being done.

However at least in 1 case 2 flushes are done instead.

Trigger is:
conn = new DalConnectionProvider()
and then use
connection = conn.getConnection()

which inside the DalConnectionProvider inside the getConnection() method does not have connection member initialized (first use):
      if (connection == null || connection.isClosed()) {
        connection = OBDal.getInstance(pool).getConnection(flush);
      }

but then a few lines later also calls this:
    // always flush all remaining actions
    if (flush) {
      OBDal.getInstance(pool).flush();
    }

Which does 2 flushes in practice when only 1 single one is requested.
Steps To Reproducecalling this java method reproduces the problem
SystemInfo.getSystemIdentifier()

That happen i.e. in the StaticResources request calling it during ftl template processing.
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0036638 newplatform DalConnectionProvider(true) or () in combination with standard xsql causes 1 flush per SQL 
related to defect 0035193 closedcaristu Error fired when trying to print and attach a document 
related to defect 0035356 closedcaristu print & attach doc logs error using (old) commons jdbc pool 
related to defect 0036607 acknowledgedplatform 4 flushes of 10ms each in StaticResources request 
related to design defect 0036606 newplatform Clean up extra not requires flush() calls 

-  Notes
(0098487)
hgbot (developer)
2017-08-11 12:18

Repository: erp/devel/pi
Changeset: 64c98f878ddb9f4f0e82905509d191d95fd06764
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Aug 11 11:59:39 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/64c98f878ddb9f4f0e82905509d191d95fd06764 [^]

fixed bug 36636: double flush using DalConnectionProvider(true) if con==null

  When trying to get connection from DalConnectionProvider having set flush=true,
  extra flush is performed in case there's no connection or it's already closed.

  As flush is performed later, this case should alway retrieve connection preventing
  flush.

---
M src/org/openbravo/service/db/DalConnectionProvider.java
---
(0098491)
caristu (developer)
2017-08-11 13:08

Code reviewed + tested OK.
(0099308)
hudsonbot (developer)
2017-09-21 16:49

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

- Issue History
Date Modified Username Field Change
2017-08-10 16:12 shuehner New Issue
2017-08-10 16:12 shuehner Assigned To => platform
2017-08-10 16:12 shuehner Modules => Core
2017-08-10 16:12 shuehner Triggers an Emergency Pack => No
2017-08-10 16:13 shuehner Relationship added related to 0036607
2017-08-10 16:13 shuehner Relationship added related to 0036606
2017-08-10 17:16 shuehner Relationship added related to 0036638
2017-08-11 11:49 alostale Tag Attached: Performance
2017-08-11 12:18 hgbot Checkin
2017-08-11 12:18 hgbot Note Added: 0098487
2017-08-11 12:18 hgbot Status new => resolved
2017-08-11 12:18 hgbot Resolution open => fixed
2017-08-11 12:18 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/64c98f878ddb9f4f0e82905509d191d95fd06764 [^]
2017-08-11 12:18 alostale Assigned To platform => alostale
2017-08-11 12:19 alostale Review Assigned To => caristu
2017-08-11 12:45 caristu Relationship added related to 0035193
2017-08-11 12:45 caristu Relationship added related to 0035356
2017-08-11 13:08 caristu Note Added: 0098491
2017-08-11 13:08 caristu Status resolved => closed
2017-08-11 13:08 caristu Fixed in Version => 3.0PR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099308


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker