Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0053774 | Openbravo ERP | A. Platform | public | 2023-10-26 14:07 | 2023-10-27 08:48 |
|
Reporter | caristu | |
Assigned To | caristu | |
Priority | high | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | PR23Q4 | |
Merge Request Status | approved |
Review Assigned To | |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Packaging and release |
Regression date | 2023-08-21 |
Regression introduced in release | |
Regression introduced by commit | https://gitlab.com/openbravo/product/openbravo/-/commit/03fa452e48c60b06e2f1a70f29a093bbf07004d0 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0053774: RO pool is not closed by IE threads |
Description | If the process executed by an Import Entry makes use of the RO pool, then the transactions of that pool are never closed. |
Steps To Reproduce | 1) Configure the RO pool
2) In the "External System" window, create a new external system
3) In the "Event Subscription" window, create an event subscription for the "Resend Orders" event and for the external system created in step 2). Note that being a multiple record event, the RO pool is used by default to get the data.
4) Trigger the event doing (see attached patch):
SynchronizationEvent.getInstance()
.triggerEvent("API_ResendOrders",
Map.of("orders", List.of("E1987F8E432041BD9F81D3DD29D6D4CB")));
5) In database, run: select count(*) from pg_stat_activity where state ilike '%in transaction%';
Note that the count of "idle in transaction" connections is increased every time the event is triggered |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0053779 | PR23Q4 | closed | caristu | RO pool is not closed by IE threads | caused by | feature request | 0052614 | | closed | cberner | There should be a mechanism to have non-blocking async EDL Requests |
|
Attached Files | About.diff (1,326) 2023-10-26 14:23 https://issues.openbravo.com/file_download.php?file_id=19101&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2023-10-26 14:07 | caristu | New Issue | |
2023-10-26 14:07 | caristu | Assigned To | => caristu |
2023-10-26 14:07 | caristu | OBNetwork customer | => No |
2023-10-26 14:07 | caristu | Modules | => Core |
2023-10-26 14:07 | caristu | Triggers an Emergency Pack | => No |
2023-10-26 14:09 | hgbot | Merge Request Status | => open |
2023-10-26 14:09 | hgbot | Note Added: 0156328 | |
2023-10-26 14:23 | caristu | File Added: About.diff | |
2023-10-26 14:24 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=27045#r27045 |
2023-10-26 17:17 | rafaroda | Relationship added | related to 0052614 |
2023-10-26 18:05 | caristu | Relationship deleted | related to 0052614 |
2023-10-26 18:06 | caristu | Relationship added | caused by 0052614 |
2023-10-26 18:07 | caristu | Regression level | => Packaging and release |
2023-10-26 18:07 | caristu | Regression date | => 2023-08-21 |
2023-10-26 18:08 | caristu | Status | new => scheduled |
2023-10-27 07:34 | alostale | Regression introduced by commit | => https://gitlab.com/openbravo/product/openbravo/-/commit/03fa452e48c60b06e2f1a70f29a093bbf07004d0 [^] |
2023-10-27 08:48 | hgbot | Merge Request Status | open => approved |
2023-10-27 08:48 | hgbot | Note Added: 0156433 | |
2023-10-27 08:48 | hgbot | Resolution | open => fixed |
2023-10-27 08:48 | hgbot | Status | scheduled => closed |
2023-10-27 08:48 | hgbot | Fixed in Version | => PR24Q1 |
2023-10-27 08:48 | hgbot | Note Added: 0156434 | |
2023-10-27 08:48 | hgbot | Fixed in Version | PR24Q1 => PR23Q4 |
2023-10-27 08:48 | hgbot | Note Added: 0156435 | |
Notes |
|
(0156328)
|
hgbot
|
2023-10-26 14:09
|
|
|
|
(0156433)
|
hgbot
|
2023-10-27 08:48
|
|
|
|
(0156434)
|
hgbot
|
2023-10-27 08:48
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 8f74368a0f9313d57074758d01016d685ed090fe
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 26-10-2023 16:19:04
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/8f74368a0f9313d57074758d01016d685ed090fe [^]
fixes BUG-53774: RO pool is never closed by IE threads
If a process executed in an import entry used the RO pool, the
connection was not being closed properly by the infrastructure under
some circumstances.
We had different scenarios depending on the process being executed in
the import entry thread:
- If the process executed was a blocking EDL process, the RO pool
session was being always closed because the postProcessEntry method was
invoked using the SessionHandler that had the reference to the open
session.
- If the process executed in the import entry was a non-blocking EDL
process, the RO pool session was NOT being closed because the
postProcessEntry method used a SessionHandler which do not have the
reference to the open session, because it was invoked by a different
thread.
- If the process was not an EDL process, the RO pool was being closed
in case the process was executed without errors. If the process failed,
the RO pool session was not being closed.
Now we fix the two scenarios where the session was not being closed.
Note that for the case of a successful execution we now use
DalThreadCleaner().getInstance.cleanWithCommit() method for consistency
and to avoid some small code duplicity.
---
M src/org/openbravo/service/importprocess/ImportEntryProcessor.java
---
|
|
|
(0156435)
|
hgbot
|
2023-10-27 08:48
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: bb1afc38f7ba4919b7f534de3015576e98368547
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 26-10-2023 16:16:56
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/bb1afc38f7ba4919b7f534de3015576e98368547 [^]
fixes BUG-53774: RO pool is never closed by IE threads
If a process executed in an import entry used the RO pool, the
connection was not being closed properly by the infrastructure under
some circumstances.
We had different scenarios depending on the process being executed in
the import entry thread:
- If the process executed was a blocking EDL process, the RO pool
session was being always closed because the postProcessEntry method was
invoked using the SessionHandler that had the reference to the open
session.
- If the process executed in the import entry was a non-blocking EDL
process, the RO pool session was NOT being closed because the
postProcessEntry method used a SessionHandler which do not have the
reference to the open session, because it was invoked by a different
thread.
- If the process was not an EDL process, the RO pool was being closed
in case the process was executed without errors. If the process failed,
the RO pool session was not being closed.
Now we fix the two scenarios where the session was not being closed.
Note that for the case of a successful execution we now use
DalThreadCleaner().getInstance.cleanWithCommit() method for consistency
and to avoid some small code duplicity.
---
M src/org/openbravo/service/importprocess/ImportEntryProcessor.java
---
|
|