Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034453Openbravo ERPA. Platformpublic2016-11-09 15:082016-12-16 18:39
inigosanchez 
inigosanchez 
highminorhave not tried
closedfixed 
5
 
3.0PR17Q1 
caristu
Core
No
0034453: transaction is leaked if HeartbeatProcess fails
If HeartbeatProcess fails in a specific part of the execute method and the beat type is "SCHEDULED_BEAT", a require explicit commit is not done. See this code here[1].

The problem have found in CDS enviroment. In this enviroment HeartbeatProcess fails (status: ERR) for a unknown reason. [See attached HeartbeatProcessErrorLog file] Then the commit is not done and a transaction is opened for hours.

[1].- https://code.openbravo.com/erp/devel/pi/file/e0bcd0b2606d/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java#l156 [^]
Ask ALopetegui for enviroment
Move this piece of code to finally block maybe is enough.
No tags attached.
related to defect 0029622 closed jarmendariz The heartbeat background process fails if the ad_session table is empty 
? HeartbeatProcessErrorLog (4,204) 2016-12-16 13:17
https://issues.openbravo.com/file_download.php?file_id=10185&type=bug
Issue History
2016-11-09 15:08inigosanchezNew Issue
2016-11-09 15:08inigosanchezAssigned To => iciordia
2016-11-09 15:08inigosanchezModules => Core
2016-11-09 15:08inigosanchezTriggers an Emergency Pack => No
2016-11-09 15:11inigosanchezAssigned Toiciordia => platform
2016-11-09 15:12inigosanchezIssue Monitored: ALopetegui
2016-12-01 12:53alostaleSummaryIf HeartbeatProcess fails a require explicit commit couldn't be execute => transaction is leaked if HeartbeatProcess fails
2016-12-01 12:53alostaleStatusnew => acknowledged
2016-12-01 13:20alostalePrioritylow => normal
2016-12-01 14:03alostalePrioritynormal => high
2016-12-15 15:23inigosanchezAssigned Toplatform => inigosanchez
2016-12-15 15:23inigosanchezStatusacknowledged => scheduled
2016-12-15 16:48hgbotCheckin
2016-12-15 16:48hgbotNote Added: 0092420
2016-12-15 16:48hgbotStatusscheduled => resolved
2016-12-15 16:48hgbotResolutionopen => fixed
2016-12-15 16:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/31a1cfd3b0aef7ee4905acda5e680ba935124e7b [^]
2016-12-15 16:48inigosanchezReview Assigned To => caristu
2016-12-16 12:40caristuRelationship addedrelated to 0029622
2016-12-16 12:55caristuNote Added: 0092483
2016-12-16 12:55caristuStatusresolved => new
2016-12-16 12:55caristuResolutionfixed => open
2016-12-16 13:14inigosanchezStatusnew => scheduled
2016-12-16 13:17inigosanchezDescription Updatedbug_revision_view_page.php?rev_id=14036#r14036
2016-12-16 13:17inigosanchezFile Added: HeartbeatProcessErrorLog
2016-12-16 13:25hgbotCheckin
2016-12-16 13:25hgbotNote Added: 0092494
2016-12-16 13:26inigosanchezStatusscheduled => resolved
2016-12-16 13:26inigosanchezResolutionopen => fixed
2016-12-16 13:55caristuNote Added: 0092498
2016-12-16 13:55caristuStatusresolved => closed
2016-12-16 13:55caristuFixed in Version => 3.0PR17Q1
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092722
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092728

Notes
(0092420)
hgbot   
2016-12-15 16:48   
Repository: erp/devel/pi
Changeset: 31a1cfd3b0aef7ee4905acda5e680ba935124e7b
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Dec 15 16:45:04 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/31a1cfd3b0aef7ee4905acda5e680ba935124e7b [^]

Fixed issue 34453: transaction is leaked if HeartbeatProcess fails.

If HeartbeatProcess fails in a specific part of the execute method and
the beat type is "SCHEDULED_BEAT", the require explicit commit is not done.

Now, a require explicit commit is done in finally blocks in order to ensures
that always is executed.

---
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
---
(0092483)
caristu   
2016-12-16 12:55   
reopened due to code review:
https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0092494)
hgbot   
2016-12-16 13:25   
Repository: erp/devel/pi
Changeset: 56b8427f2716119038d15294a35e3a2786515b5c
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Dec 16 13:22:24 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/56b8427f2716119038d15294a35e3a2786515b5c [^]

Related with issue 34453:Added missing catch block for the commitAndClose

---
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
---
(0092498)
caristu   
2016-12-16 13:55   
Reviewed.
(0092722)
hudsonbot   
2016-12-16 18: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/dc8bf00badd0 [^]
Maturity status: Test
(0092728)
hudsonbot   
2016-12-16 18: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/dc8bf00badd0 [^]
Maturity status: Test