Openbravo Issue Tracking System - Modules
View Issue Details
0047219ModulesExternal Data Integrationpublic2021-06-23 11:082022-04-04 14:17
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
0047219: Use different runnables for EDL processes that should be executed in a specific thread
ImportEntryProcessors has the ability to generate a key which is used to select a runnable to execute its task.

In the case of EDLImportEntryProcessor, currently the key is calculated as follows:

- If the EDL process is configured as "Use Single Thread For Search Key", then the same key prefixed with "OBEDL" is returned for a given EDL process search key.
-If not a random key is calculated

In both cases, it is ensured that the key is a value between 0 and 20 in order to ensure that no more than 20 runnables are created for the EDL processing.

But this logic is currently not taking into account that the same runnable can be selected by EDL processes regardless of their configuration.

Taking into account that typically processes configured as "Use Single Thread For Search Key" can have more processes accumulated on its queue pending to be executed, this can cause other EDL processes that do not require to be executed on a specific thread to end waiting to be executed on that thread queue while having other runnables available without the need to wait.

So it seems that it makes sense to make the process selection key logic of the EDLImportEntryProcessor to take into account this case. Thus, process selection keys returned for those processes configured as "Use Single Thread For Search Key" will always be different than the keys returned by the rest of EDL processes.

Thus, with this solution we'll enable 40 runnables at most for EDL processing (20 for each for type: single thread and "normal" EDL processes)
.
NOR
related to defect 0047139 closed AugustoMauch Openbravo ERP Import entries can be permanently left unprocessed, in Initial status 
related to defect 0048427 closed alostale Openbravo ERP high load of low priority import entries can cause higher priority entries not to be processed 
related to defect 0048418 new Triage Platform Conn Openbravo ERP import entries can be processed twice if their key is not deterministic 
Issue History
2021-06-23 11:08caristuNew Issue
2021-06-23 11:08caristuAssigned To => platform
2021-06-23 12:10caristuDescription Updatedbug_revision_view_page.php?rev_id=22759#r22759
2021-06-23 12:10caristuAssigned Toplatform => caristu
2021-06-23 16:43hgbotNote Added: 0129747
2021-06-23 16:47caristuDescription Updatedbug_revision_view_page.php?rev_id=22760#r22760
2021-06-23 17:00caristuSummaryUse different runnables for EDL processes that should execute in a specific thread => Use different runnables for EDL processes that should be executed in a specific thread
2021-06-23 17:23rafarodaTag Attached: NOR
2021-06-25 13:55hgbotResolutionopen => fixed
2021-06-25 13:55hgbotStatusnew => closed
2021-06-25 13:55hgbotNote Added: 0129796
2021-06-25 13:55hgbotNote Added: 0129797
2021-06-25 14:00caristuDescription Updatedbug_revision_view_page.php?rev_id=22790#r22790
2021-06-29 22:47rafarodaRelationship addedrelated to 0047139
2022-04-04 14:17rafarodaRelationship addedrelated to 0048427
2022-04-04 14:17rafarodaRelationship addedrelated to 0048418

Notes
(0129747)
hgbot   
2021-06-23 16:43   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/7 [^]
(0129796)
hgbot   
2021-06-25 13:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration [^]
Changeset: 38e3899c8903aa44de65b8b7c1944e855e68ce3b
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 2021-06-23T16:43:49+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/38e3899c8903aa44de65b8b7c1944e855e68ce3b [^]

fixes BUG-47219: different runnables for "single thread" EDL processes

  Now EDL processes marked as "Use Single Thread For Search Key" will
be executed with a different set of runnables from the rest of EDL
processes.

  This is managed by using a different set of selection keys for that
kind of EDL processes.

---
M src/org/openbravo/externaldata/integration/process/EDLImportEntryProcessor.java
---
(0129797)
hgbot   
2021-06-25 13:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/7 [^]