Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0052456 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | random | 2023-05-16 10:17 | 2023-06-01 10:50 | |||
Reporter | gorkaion | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | Gold | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 64183 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0052456: Import Entry post process hook not executed when processing node is changed | |||||||
Description | On a clustered environment with 2 application nodes. If the node handling import entries is changed from node A to node B while node A is still processing Import Entries. When the node B start processing it searches import entries and queue some that are also queued and to be processed in node A. This means that those import entries are processed in both nodes. In some cases the Import Entry is processed but the status is left in error with the error message: "Import entry {importEntryId} could not be processed in node {node A} because active node is {node B}" We observe that when this happens the process is committed into the database but the Import Entry PostProcess hook is not executed. We reproduce this problem in a customer that has a postprocess hook on Order requests. When the node switch is done we see some Order requests with the "could not be processed" error in the Import Entry. On these Import Entries but the Sales Order already exists in the database but the related records created by the PostProcess hook are not generated. There are 2 possible scenarios that could produce above case: * Scenario 1 When the Import Entry is processed in Node A the Order is committed to the database before the handling check is executed. * Scenario 2 The processing in Node A does the rollback and leaves the Import Entry with that error. Later the record is processed in Node B and the order is properly generated and committed but the status is not changed to Processed so the post process hook is not executed. | |||||||
Steps To Reproduce | Rough steps: - Build a cluster environment with node A and B. - Generate some Import Entries. - When all Import Entries are queued in node A switch to node B. - node B queue all the Import Entries again. - Make the processing in node B slower so a Import Entry is processed first in node A - Check that the import entry is left in Error status. | |||||||
Proposed Solution | - Improve the is handling check to be done before the Import Entry starts to process. - Check the management of the "could not be processed" OBException to ensure proper rollback is done. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||||||||||||||||
|
![]() |
|
(0150069) hgbot (developer) 2023-05-22 14:17 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/889 [^] |
(0150070) hgbot (developer) 2023-05-22 14:19 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/528 [^] |
(0150458) hgbot (developer) 2023-05-30 08:20 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/889 [^] |
(0150459) hgbot (developer) 2023-05-30 08:20 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: f0c667ef8dc579a91893ae98cb2a300a483f4c10 Author: Carlos Aristu <carlos.aristu@openbravo.com> Date: 30-05-2023 05:47:06 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f0c667ef8dc579a91893ae98cb2a300a483f4c10 [^] fixes BUG-52456: method to commit only if the IE is executed in the leader of the cluster --- M src/org/openbravo/service/importprocess/ImportEntryManager.java --- |
(0150460) hgbot (developer) 2023-05-30 08:20 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/merge_requests/528 [^] |
(0150461) hgbot (developer) 2023-05-30 08:20 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^] Changeset: 501a7490eea010f30df396f386dd89210e865db0 Author: Carlos Aristu <carlos.aristu@openbravo.com> Date: 30-05-2023 05:50:46 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/501a7490eea010f30df396f386dd89210e865db0 [^] fixes BUG-52456: commit only if we are in the node handling the import entry Being in cluster mode, commit the changes done in the middle of the process if we are in the node in charge of handling the import entries. --- M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java --- |
(0150571) hgbot (developer) 2023-06-01 09:01 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/900 [^] |
(0150578) hgbot (developer) 2023-06-01 10:50 |
Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 66beca0118a44b5157115eb406d7b8c87b050da3 Author: Carlos Aristu <carlos.aristu@openbravo.com> Date: 01-06-2023 08:59:11 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/66beca0118a44b5157115eb406d7b8c87b050da3 [^] related to ISSUE-52456: allow to commit outside of the IEM threads This is done now to avoid failing if this code is invoked outside of the ImportEntryManager infrastructure, which is NOT recommended. In that case now the "commitCurrentTransaction" method will not fail if it is executed in a node that is not the cluster leader. --- M src/org/openbravo/service/importprocess/ImportEntryManager.java --- |
(0150579) hgbot (developer) 2023-06-01 10:50 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/900 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2023-05-16 10:17 | gorkaion | New Issue | |
2023-05-16 10:17 | gorkaion | Assigned To | => Triage Platform Conn |
2023-05-16 10:17 | gorkaion | OBNetwork customer | => No |
2023-05-16 10:17 | gorkaion | Modules | => Core |
2023-05-16 10:17 | gorkaion | Triggers an Emergency Pack | => No |
2023-05-16 10:17 | gorkaion | Issue generated from | 0052455 |
2023-05-16 10:17 | gorkaion | Relationship added | related to 0052455 |
2023-05-16 10:29 | gorkaion | OBNetwork customer | No => Gold |
2023-05-16 10:29 | gorkaion | Support ticket | => 64183 |
2023-05-16 10:30 | gorkaion | Relationship added | related to 0052457 |
2023-05-16 10:31 | gorkaion | Relationship added | related to 0052445 |
2023-05-18 14:33 | ngarcia | Issue Monitored: ngarcia | |
2023-05-18 17:09 | adrianromero | Assigned To | Triage Platform Conn => caristu |
2023-05-22 14:17 | hgbot | Merge Request Status | => open |
2023-05-22 14:17 | hgbot | Note Added: 0150069 | |
2023-05-22 14:19 | hgbot | Note Added: 0150070 | |
2023-05-30 08:19 | hgbot | Merge Request Status | open => approved |
2023-05-30 08:20 | hgbot | Resolution | open => fixed |
2023-05-30 08:20 | hgbot | Status | new => closed |
2023-05-30 08:20 | hgbot | Note Added: 0150458 | |
2023-05-30 08:20 | hgbot | Fixed in Version | => PR23Q3 |
2023-05-30 08:20 | hgbot | Note Added: 0150459 | |
2023-05-30 08:20 | hgbot | Note Added: 0150460 | |
2023-05-30 08:20 | hgbot | Fixed in Version | PR23Q3 => RR23Q3 |
2023-05-30 08:20 | hgbot | Note Added: 0150461 | |
2023-06-01 09:01 | hgbot | Note Added: 0150571 | |
2023-06-01 10:50 | hgbot | Note Added: 0150578 | |
2023-06-01 10:50 | hgbot | Note Added: 0150579 |
Copyright © 2000 - 2009 MantisBT Group |