Openbravo Issue Tracking System - Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0047551 | Modules | Advanced Warehouse Operations | public | 2021-08-13 14:10 | 2021-09-23 13:25 |
|
Reporter | lbressan | |
Assigned To | vmromanos | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Review Assigned To | |
Support ticket | |
OBNetwork customer | |
Regression introduced in release | |
|
Summary | 0047551: Generate picking process can be launched twice in parrallel -> this generates two picking tasks for certain items |
Description | If we launch the picking process in parallel, repeated picking tasks are generated for certain items |
Steps To Reproduce | Login with two users
Isolate a big order (1000 lines )
both users click generate picking at the same time
the system will generate certain tasks double |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | has duplicate | defect | 0048053 | | closed | vmromanos | Openbravo ERP | Sales Order Lines Picking window can be opened on multiple tabs simultaneously | causes | defect | 0047730 | | closed | vmromanos | Modules | The replenishment priority is not respected |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2021-08-13 14:10 | lbressan | New Issue | |
2021-08-13 14:10 | lbressan | Assigned To | => Triage Finance |
2021-08-25 12:44 | lbressan | Note Added: 0131351 | |
2021-08-31 07:25 | ranjith_qualiantech_com | Assigned To | Triage Finance => ranjith_qualiantech_com |
2021-09-02 09:32 | ranjith_qualiantech_com | Status | new => scheduled |
2021-09-07 05:47 | hgbot | Note Added: 0131585 | |
2021-09-10 14:45 | lbressan | Note Added: 0131711 | |
2021-09-16 16:35 | vmromanos | Assigned To | ranjith_qualiantech_com => vmromanos |
2021-09-16 16:35 | hgbot | Note Added: 0131876 | |
2021-09-16 17:21 | vmromanos | Note Added: 0131877 | |
2021-09-16 17:46 | hgbot | Note Added: 0131878 | |
2021-09-17 13:09 | hgbot | Resolution | open => fixed |
2021-09-17 13:09 | hgbot | Status | scheduled => closed |
2021-09-17 13:09 | hgbot | Note Added: 0131902 | |
2021-09-17 13:09 | hgbot | Note Added: 0131903 | |
2021-09-21 12:00 | vmromanos | Relationship added | causes 0047730 |
2021-09-23 13:25 | eugeni | Issue Monitored: eugeni | |
2021-11-15 14:08 | vmromanos | Relationship added | related to 0048053 |
2021-11-15 15:11 | vmromanos | Relationship replaced | has duplicate 0048053 |
2022-09-06 17:18 | caristu | Category | Advance Warehouse Operations => Advanced Warehouse Operations |
Notes |
|
|
|
|
(0131585)
|
hgbot
|
2021-09-07 05:47
|
|
|
|
|
|
|
(0131876)
|
hgbot
|
2021-09-16 16:35
|
|
|
|
|
Test plan (requires an Eclipse environment already configured) I:
Login in the backoffice as AWO-QA Admin
Create a new Purchase Order with two lines. Book it.
In Eclipse set two breakpoints in:
- InventoryTransactionTypeAlgorithm.java, line 247 (in the call to the init method)
- TaskGenerator.java, line 102 (in the flush after the call to the createTask method)
Press the Receive button and continue the execution till the first stop of the TaskGenerator breakpoint (a task has been generated already at this point).
Login in a different browser and open the same purchase order.
Press the Receive button.
Verify the InventoryTransactionTypeAlgorithm's breakpoint is not reached yet due to the lock.
Continue the execution of the previous thread till the completion. Two tasks are created.
Now realize the InventoryTransactionTypeAlgorithm's breakpoint is activated. This is the execution of the second reception.
Continue with the execution.
Verify the second reception process does not generate any task (because they were generated by the first run).
Test plan (requires an Eclipse environment already configured) II:
Login in the backoffice as AWO-QA Admin
Create a new Purchase Order with two lines. Book it.
In Eclipse set two breakpoints in:
- InventoryTransactionTypeAlgorithm.java, line 247 (in the call to the init method)
- TaskGenerator.java, line 102 (in the flush after the call to the createTask method)
Press the Receive button and continue the execution till the first stop of the TaskGenerator breakpoint (a task has been generated already).
Login in a different browser and create a new purchase order.
Press the Receive button.
Verify the InventoryTransactionTypeAlgorithm's breakpoint is reached, because the previous lock in the previous sales order doesn't affect this one.
Continue the two threads till the end.
Verify the system generates tasks for both sales orders. |
|
|
(0131878)
|
hgbot
|
2021-09-16 17:46
|
|
|
|
(0131902)
|
hgbot
|
2021-09-17 13:09
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations [^]
Changeset: 4eb767e887daf2b68a8c9346d0ca49179938f2f7
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-09-17T11:33:56+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations/-/commit/4eb767e887daf2b68a8c9346d0ca49179938f2f7 [^]
Fixed ISSUE-47551: Implemented lock by object in task generation
The lock only affects the object we are generating tasks for. It avoids to
launch in parallel more than one task generation for this object; for example
two pickings for the same sales order, or a picking and an issue for
the same sales order.
For example, in the case the user tries to launch two picking task generations
for the same sales order in parallel, the first one will actually generate the tasks
meanwhile the second thread is waiting. Then this second thread won't generate
anything because at its execution time the tasks will be already created.
Note that after this lock at document level, there is already implemented another
lock at warehouse level in the moment the tasks are being generated from the task
requirements. So the flow is:
1. A task generation is performed for an object
2. [NEW] the object is locked so no more tasks generation can be launched for it.
3. The tasks requirements are generated
4. Just after the tasks requeriment calculation is over, a Warehouse level lock
is performed, so no tasks generations can be run in parallel for this warehouse.
5. The tasks are created and saved, and all the hooks are executed.
6. The process is completed. In that moment both locks are released.
The warehouse lock was not enough in this case, especially if the task requirement
generation process is slow (for example a sales order with hundred of lines).
From a performance point of view, this lock doesn't add any overhead as it is done
at object level. So it's perfectly fine to generate tasks for two different objects
at the same time.
---
M src/org/openbravo/warehouse/advancedwarehouseoperations/centralbroker/InventoryTransactionTypeAlgorithm.java
---
|
|
|
(0131903)
|
hgbot
|
2021-09-17 13:09
|
|
|