Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053779
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajorhave not tried2023-10-26 14:072023-10-27 11:04
ReportercaristuView Statuspublic 
Assigned Tocaristu 
PriorityhighResolutionfixedFixed in VersionPR23Q4
StatusclosedFix in branchFixed in SCM revisionbb1afc38f7ba
ProjectionnoneETAnoneTarget VersionPR23Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression levelPackaging and release
Regression date2023-08-21
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0053779: RO pool is not closed by IE threads

DescriptionIf the process executed by an Import Entry makes use of the RO pool, then the transactions of that pool are never closed.
Steps To Reproduce1) 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0053774 closedcaristu RO pool is not closed by IE threads 

-  Notes
(0156413)
hgbot (developer)
2023-10-26 18:15

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1031 [^]
(0156436)
hgbot (developer)
2023-10-27 08:48

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1031 [^]
(0156444)
alostale (manager)
2023-10-27 11:03

Fixed by commit with incorrect message:


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

- Issue History
Date Modified Username Field Change
2023-10-26 18:08 caristu Type defect => backport
2023-10-26 18:08 caristu Target Version => PR23Q4
2023-10-26 18:15 hgbot Note Added: 0156413
2023-10-27 08:48 hgbot Note Added: 0156436
2023-10-27 11:03 alostale Note Added: 0156444
2023-10-27 11:04 alostale Status scheduled => resolved
2023-10-27 11:04 alostale Fixed in Version => PR23Q4
2023-10-27 11:04 alostale Fixed in SCM revision => https://gitlab.com/openbravo/product/openbravo/-/commit/bb1afc38f7ba4919b7f534de3015576e98368547 [^]
2023-10-27 11:04 alostale Resolution open => fixed
2023-10-27 11:04 alostale Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker