Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030837Openbravo ERPA. Platformpublic2015-09-16 13:412015-09-22 16:33
gorkaion 
gorkaion 
normalminoralways
closedfixed 
5
 
3.0PR16Q13.0PR15Q4 
AugustoMauch
Core
No
0030837: Same import entry can be added several times to a runnable
The ImportEntryManager is in charge of searching Import Entries that have not been processed to execute them.

The process to look for new ones is executed assuming that 50 entries are processed each second. If the time to process the entries is higher the entries that are still pending to process are loaded again and added to the queue.
Activate logs of ImportEntryManager and ImportEntryProcessor
Create a process that takes longer than 20ms per entry, or set up a sleep on an existing one.
Load some entries.
check the logs and notice that the message "Adding entry to runnable with key ..." appears more times that entries were loaded. This is because all the pending entries are added again without checking if they already are in the runnable queue.
Modify the assignEntryToThread() method of ImportEntryProcessor.

Check if the given entry Id is already in the importEntryIds list of the runnable assigned to the given key.
No tags attached.
Issue History
2015-09-16 13:41gorkaionNew Issue
2015-09-16 13:41gorkaionAssigned To => gorkaion
2015-09-16 13:41gorkaionModules => Core
2015-09-16 13:41gorkaionTriggers an Emergency Pack => No
2015-09-17 18:48gorkaionReview Assigned To => mtaal
2015-09-17 18:56hgbotCheckin
2015-09-17 18:56hgbotNote Added: 0080464
2015-09-17 18:56hgbotStatusnew => resolved
2015-09-17 18:56hgbotResolutionopen => fixed
2015-09-17 18:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0e91bbf913d31fef9bcc36d995060ecd18645383 [^]
2015-09-18 05:08hudsonbotCheckin
2015-09-18 05:08hudsonbotNote Added: 0080479
2015-09-19 14:04hgbotCheckin
2015-09-19 14:04hgbotNote Added: 0080511
2015-09-21 15:01mtaalReview Assigned Tomtaal => AugustoMauch
2015-09-21 17:14hudsonbotCheckin
2015-09-21 17:14hudsonbotNote Added: 0080539
2015-09-22 16:33AugustoMauchNote Added: 0080562
2015-09-22 16:33AugustoMauchStatusresolved => closed
2015-09-22 16:33AugustoMauchFixed in Version => 3.0PR15Q4

Notes
(0080464)
hgbot   
2015-09-17 18:56   
Repository: erp/devel/pi
Changeset: 0e91bbf913d31fef9bcc36d995060ecd18645383
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Sep 16 16:14:51 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0e91bbf913d31fef9bcc36d995060ecd18645383 [^]

Fixed issue 30837.Added contains check in ImportEntryProcessor

Check if the import entry id is already in the runnable entry list before
calling the addEntry method.

---
M src/org/openbravo/service/importprocess/ImportEntryProcessor.java
---
(0080479)
hudsonbot   
2015-09-18 05:08   
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/68dbc59de475 [^]
Maturity status: Test
(0080511)
hgbot   
2015-09-19 14:04   
Repository: erp/devel/pi
Changeset: d5e847e3d7247fac493f8f1a8021a2d1925f14a0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Sep 18 12:36:40 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d5e847e3d7247fac493f8f1a8021a2d1925f14a0 [^]

Related to issue 30837: Same import entry can be added several times to a runnable
There is already a check if importentry id is present, use it, move log statement

---
M src/org/openbravo/service/importprocess/ImportEntryProcessor.java
---
(0080539)
hudsonbot   
2015-09-21 17:14   
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/6f65b2541f60 [^]
Maturity status: Test
(0080562)
AugustoMauch   
2015-09-22 16:33   
Code reviewed and verified in pi@3c9d542f4abb