Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0049501 | Openbravo ERP | A. Platform | public | 2022-06-07 18:16 | 2022-06-08 07:11 | |||||||
Reporter | vmromanos | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0049501: Different transactional behavior in Oracle vs Postgres | |||||||||||
Description | In AD_UPDATE_PINSTANCE procedure, which is used to call some old (but very important) processes, we have this difference in code between PG and Oracle: -- Oracle IF (p_doCommit = 'Y') THEN COMMIT; END IF; -- Postgres IF (p_doCommit = 'Y') THEN -- COMMIT; END IF; This change seems to be done in the DBSM directly. This difference in the code makes that the transactional behavior between Oracle and Postgres is different, creating weird behaviors. | |||||||||||
Steps To Reproduce | This issue can be reproduced in this automated test: org.openbravo.api.tests.importer.ImportInventory The flow is the following: 1. We try to import a Physical Inventory trough the Openbravo API 2. As part of the import process, a preference is temporary created org.openbravo.warehouse.advancedwarehouseoperations.api.hooks.inventory.ImportInventoryOBObjectInitializer 3. Once the document is imported, the import process calls the M_INVENTORY_LISTUPDATE in org.openbravo.api.hook.inventory.ImportedInventoryBaseOBObjectAfterFlushHook 4. Then in Oracle a COMMIT is executed. In PG no COMMIT happens 5. The physical inventory is processed 6. Then the import process removes the temporal preference created before org.openbravo.warehouse.advancedwarehouseoperations.api.hooks.inventory.ImportedInventoryBaseOBObjectAfterFlushHookExtension 7. Then the automated test tries to rollback the transaction in org.openbravo.api.tests.importer.ApiImportMappingBaseTest [cleanChanges()] In PG everything works fine and the database is not modified at all, because there is no COMMIT in the middle of the process. However, in Oracle the preference and the physical inventory are saved in the DB because there is a COMMIT in #4 | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2022-06-07 18:16 | vmromanos | New Issue | ||||||||||
2022-06-07 18:16 | vmromanos | Assigned To | => Triage Platform Base | |||||||||
2022-06-07 18:16 | vmromanos | Modules | => Core | |||||||||
2022-06-07 18:16 | vmromanos | Triggers an Emergency Pack | => No | |||||||||
2022-06-07 19:09 | hgbot | Note Added: 0138125 | ||||||||||
2022-06-08 07:11 | alostale | Relationship added | related to 0019438 |
Notes | |||||
|
|||||
|
|