Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0049501 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Openbravo ERP] A. Platform | major | always | 2022-06-07 18:16 | 2022-06-08 07:11 | |||||||
Reporter | vmromanos | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | 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 | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
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 | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0138125) hgbot (developer) 2022-06-07 19:09 |
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.api.tests [^] Changeset: 675da3e119a8cf7605cd5c5a252abba3d5a7e9ab Author: Víctor Martínez Romanos <victor.martinez@openbravo.com> Date: 07-06-2022 18:51:45 URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.api.tests/-/commit/675da3e119a8cf7605cd5c5a252abba3d5a7e9ab [^] Related to ISSUE-49501: Warehouse related tests are not executed in Oracle The COMMIT done by the AD_UPDATE_PINSTANCE procedure breaks the test's transaction. The tests are deactivated in Oracle only by extending from a new abstract class that centralizes this behavior. On Postgres the tests are executed normally. --- A src-test/org/openbravo/api/tests/importer/ApiImportMappingSkipOracleTest.java M src-test/org/openbravo/api/tests/StandaloneTestSuite.java M src-test/org/openbravo/api/tests/importer/ImportGoodsMovement.java M src-test/org/openbravo/api/tests/importer/ImportInventory.java --- |
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 |
Copyright © 2000 - 2009 MantisBT Group |