Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0038828 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | have not tried | 2018-06-21 11:20 | 2018-06-25 18:32 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR18Q2.1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 4887e05c89dc | ||||
Projection | none | ETA | none | Target Version | 3.0PR18Q2.1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | caristu | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0038828: If flush inside TriggerHandler.enable() throws an exception, threadlocal is not cleared, thread remains with triggers disabled | |||||||
Description | If flush inside TriggerHandler.enable() throws an exception, threadlocal is not cleared, thread remains with triggers disabled. This means that when that thread is reused the database and hibernate triggers will be disabled, although still the safety mechanisms work and the disablement will not be committed to the database. | |||||||
Steps To Reproduce | Create a process that: - Disables the triggers - Adds a record that will result in an exception when the flush is done (for instance create a UOM with a name of an existing one) - Reenable the triggers. An exception will be thrown - Don't disable the triggers again, and place some log to show whether the triggers are disabled. The next time the previous thread executes that log, it will show that their triggers remain disabled. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0105361) hgbot (developer) 2018-06-25 14:52 |
Repository: erp/backports/3.0PR18Q2.1 Changeset: 4887e05c89dc0357d1049a2024210612198d80cb Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Mon Jun 25 14:52:03 2018 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/4887e05c89dc0357d1049a2024210612198d80cb [^] Fixes issue 38828: TriggerHandler.enable no longer leaves triggers disabled The problem was that if the flush indie TriggerHandler.enable (invoked when retrieving DAL's connection) failed, the clear method was not invoked, and the ThreadLocal was not reset. The next time the thread was reused, it would work with disabled triggers. Now that doesn't happen anymore because the flush is done inside the try block. --- M src/org/openbravo/dal/core/TriggerHandler.java --- |
(0105368) hgbot (developer) 2018-06-25 18:17 |
Repository: erp/backports/3.0PR18Q2.1 Changeset: 72eebae994003d05cc273025047462d84a085b57 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Mon Jun 25 18:16:41 2018 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/72eebae994003d05cc273025047462d84a085b57 [^] Related with issue 38828: Fixes log --- M src/org/openbravo/dal/core/TriggerHandler.java --- |
(0105370) caristu (viewer) 2018-06-25 18:32 |
Reviewed |
![]() |
|||
Date Modified | Username | Field | Change |
2018-06-25 14:04 | AugustoMauch | Type | defect => backport |
2018-06-25 14:04 | AugustoMauch | Target Version | => 3.0PR18Q2.1 |
2018-06-25 14:52 | hgbot | Checkin | |
2018-06-25 14:52 | hgbot | Note Added: 0105361 | |
2018-06-25 14:52 | hgbot | Status | scheduled => resolved |
2018-06-25 14:52 | hgbot | Resolution | open => fixed |
2018-06-25 14:52 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/3392fa97aa1c07f41e2727f8fdfea738c8716359 [^] => http://code.openbravo.com/erp/backports/3.0PR18Q2.1/rev/4887e05c89dc0357d1049a2024210612198d80cb [^] |
2018-06-25 18:17 | hgbot | Checkin | |
2018-06-25 18:17 | hgbot | Note Added: 0105368 | |
2018-06-25 18:32 | caristu | Note Added: 0105370 | |
2018-06-25 18:32 | caristu | Status | resolved => closed |
2018-06-25 18:32 | caristu | Fixed in Version | => 3.0PR18Q2.1 |
Copyright © 2000 - 2009 MantisBT Group |