Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036609Openbravo ERPA. Platformpublic2017-08-04 13:372017-09-21 16:49
shuehner 
alostale 
urgentminorhave not tried
closedfixed 
5
 
3.0PR17Q4 
caristu
Core
No
0036609: 2* flush in FIC when only 1 is required
FIC code does intentionally a flush+commit just before running callouts.

However it manually calls flush first + then the OBDal.getInstance().getConnection() function (with boolean param) which does another commit inside.

That should be cleaned up to not double flush
either flush manually + getConnection(false)

or getConnection(true) + comment

    OBDal.getInstance().flush();
    at org.openbravo.client.application.window.FormInitializationComponent.runCallouts(FormInitializationComponent.java:1458)

    at org.openbravo.client.application.window.FormInitializationComponent.runCallouts(FormInitializationComponent.java:1461)
      OBDal.getInstance().getConnection().commit();
Trace flushes while:
- Pressing new in any window having a callout
- Example: "Goods shipment"
At least: remove manual flush before commit
To check: if both can be completely removed, is still valid the case it was introduced for? Are ie. possible locks in ad_sequence created in a different trx?

See changeset introducing that part of code (not associated to any issue) [1]

[1] https://code.openbravo.com/erp/devel/pi/rev/224a5ad97e53 [^]
Performance
related to defect 0035855 closed alostale many standard requests borrow more than one connection from DB 
blocks design defect 0036606 new Triage Platform Base Clean up extra not requires flush() calls 
Issue History
2017-08-04 13:37shuehnerNew Issue
2017-08-04 13:37shuehnerAssigned To => platform
2017-08-04 13:37shuehnerModules => Core
2017-08-04 13:37shuehnerTriggers an Emergency Pack => No
2017-08-04 13:37shuehnerRelationship addeddepends on 0036606
2017-08-04 13:38shuehnerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15598#r15598
2017-08-10 10:40alostaleTag Attached: Performance
2017-08-10 10:44alostalePrioritynormal => urgent
2017-08-10 10:44alostaleProposed Solution updated
2017-08-10 10:45alostaleStatusnew => acknowledged
2017-08-10 10:48alostaleRelationship addedrelated to 0035855
2017-08-11 12:11alostaleProposed Solution updated
2017-08-11 12:12alostaleAssigned Toplatform => alostale
2017-08-11 12:18hgbotCheckin
2017-08-11 12:18hgbotNote Added: 0098488
2017-08-11 12:18hgbotStatusacknowledged => resolved
2017-08-11 12:18hgbotResolutionopen => fixed
2017-08-11 12:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3815628bbb6f7fc363c9a7fd2d5897af10310b55 [^]
2017-08-11 12:19alostaleReview Assigned To => caristu
2017-08-11 13:21caristuRelationship deleteddepends on 0036606
2017-08-11 13:21caristuRelationship addedblocks 0036606
2017-08-11 13:22caristuNote Added: 0098492
2017-08-11 13:22caristuStatusresolved => closed
2017-08-11 13:22caristuFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099309

Notes
(0098488)
hgbot   
2017-08-11 12:18   
Repository: erp/devel/pi
Changeset: 3815628bbb6f7fc363c9a7fd2d5897af10310b55
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Aug 11 12:17:29 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3815628bbb6f7fc363c9a7fd2d5897af10310b55 [^]

fixed bug 36609: unneeded flushes + commit on every FIC execution

  When executing FIC, before invoking callouts, a flush + commit (including an
  extra flush) was always performed to release any lock that could have been
  acquired before.

  That code was obsolete, as currently FIC does not perform any DB change before
  that point.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0098492)
caristu   
2017-08-11 13:22   
Code reviewed + testing OK.
(0099309)
hudsonbot   
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