Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039362 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | major | random | 2018-09-27 14:52 | 2018-12-11 20:22 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR19Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | d8c618c02470 | ||||
Projection | none | ETA | none | Target Version | 3.0PR19Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0039362: if ticket fails to be created due to no DB connections, no more tickets can be created from same terminal | |||||||
Description | As per design when a ticket creation fails at infrastructure level, the system will not allow to create any new ticket from the same terminal until the problem is fixed. Subsequent tickets from that are marked as error in "Data Import Entries". The most common problem detected as infrastructural is running out of database connections. Although this situation is temporary and it gets automatically fixed when pressure in DB decreases, if there are tickets being processed in a moment where there are no connections to process but there is at least a connection to mark the ticket as error, it will be marked. Afterwards no tickets from that terminal will be created till errors are marked back as initial status. | |||||||
Steps To Reproduce | Because it only happens under some race conditions, it cannot be easily reproduced. We can emulate these conditions as follows: 1. Apply patch consume-all-connections.diff 2. Set breakpoints to manually synchronize actions, in (line numbers from pi@fabe6e99f181): * About - line 60. Just when we exhausted the pool * ImportEntryProcessor - line 330. Start of doRunCycle * ImportEntryProcessor - line 441. Start of main catch block 3. In WebPOS create a ticket -> It will stop in ImportEntryProcessor 330 4. In backoffice open About popup -> It will consume all avaiable connections and stop in breakpoint 5. Resume thread stopped in 3 keeping stopped the one in About -> It will fail and stop in ImportEntryProcessor 441 6. Resume thread in About -> Connections are released 7. Resume thread in ImportEntryProcessor -> The entry is marked as error 8. Create more tickets from same terminal (no need of any breakpoint) -> Check: all these new tickets are set in error in Data Import Entries window Note pool cat get exhausted because of reaching pool limit or by reaching limit of physical DB connections, in latter case exception is dbms specific. | |||||||
Proposed Solution | The case of running out of connections should be handled as special: - When it is detected, the ticket is left in Initial status instead of setting it in Error. - If there are more tickets to be processed in the same cycle, none will be tried to be processed. - Next cycle execution will pick all the tickets that were not processed and, if there are available connections, all will be processed. In this way the problem will not be automatically fixed when instead of exposing to the end user. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() | |||||||
![]() |
|
![]() |
|
(0107059) alostale (viewer) 2018-09-28 08:06 |
attached proposed solution |
(0107151) hgbot (developer) 2018-10-04 09:22 |
Repository: erp/devel/pi Changeset: d8c618c024703178e87d4b172b3f0fc34a6549f5 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Sep 28 08:03:08 2018 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/d8c618c024703178e87d4b172b3f0fc34a6549f5 [^] fixed issue 39362: can't create tickets if one failed due to pool without conns After a ticket failed to be imported due to the pool is out of connections, no new tickets can be created from that terminal until all import entries are set again in Initial status. Now in this case instead of setting the import entry as Error preventing new tickets from the same terminal to be processed, it's kept in Initial status, in this way it will be tried to be processed in next cycle, not exposing the problem to users. --- M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java M src-core/src/org/openbravo/database/ExternalConnectionPool.java M src/org/openbravo/service/importprocess/ImportEntryProcessor.java --- |
(0107152) hgbot (developer) 2018-10-04 09:22 |
Repository: erp/devel/pi Changeset: ba9ef09516cf6e6bddb220691a55bdc720244463 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Tue Oct 02 09:43:11 2018 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/ba9ef09516cf6e6bddb220691a55bdc720244463 [^] related to issue 39362: added test cases covering no DB conns detection --- M src-test/src/org/openbravo/test/AllAntTaskTests.java A src-test/src/org/openbravo/test/db/pool/PoolHasNoConnectionsDetection.java --- |
(0107378) AugustoMauch (administrator) 2018-10-17 18:24 |
Code reviewed and verified |
(0108418) hudsonbot (viewer) 2018-12-11 20:22 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^] Maturity status: Test |
(0108419) hudsonbot (viewer) 2018-12-11 20:22 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2018-09-27 14:52 | alostale | New Issue | |
2018-09-27 14:52 | alostale | Assigned To | => alostale |
2018-09-27 14:52 | alostale | OBNetwork customer | => No |
2018-09-27 14:52 | alostale | Modules | => Core |
2018-09-27 14:52 | alostale | Triggers an Emergency Pack | => No |
2018-09-27 14:57 | alostale | Steps to Reproduce Updated | View Revisions |
2018-09-27 14:57 | alostale | Steps to Reproduce Updated | View Revisions |
2018-09-27 15:24 | alostale | File Added: consume-all-connections.diff | |
2018-09-27 15:57 | alostale | Steps to Reproduce Updated | View Revisions |
2018-09-27 15:57 | alostale | Proposed Solution updated | |
2018-09-28 08:06 | alostale | File Added: 39362.export | |
2018-09-28 08:06 | alostale | Note Added: 0107059 | |
2018-09-28 08:12 | alostale | Status | new => scheduled |
2018-09-28 08:16 | alostale | Review Assigned To | => AugustoMauch |
2018-09-28 08:17 | alostale | Target Version | => 3.0PR19Q1 |
2018-10-04 09:22 | hgbot | Checkin | |
2018-10-04 09:22 | hgbot | Note Added: 0107151 | |
2018-10-04 09:22 | hgbot | Status | scheduled => resolved |
2018-10-04 09:22 | hgbot | Resolution | open => fixed |
2018-10-04 09:22 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d8c618c024703178e87d4b172b3f0fc34a6549f5 [^] |
2018-10-04 09:22 | hgbot | Checkin | |
2018-10-04 09:22 | hgbot | Note Added: 0107152 | |
2018-10-17 18:24 | AugustoMauch | Note Added: 0107378 | |
2018-10-17 18:24 | AugustoMauch | Status | resolved => closed |
2018-10-17 18:24 | AugustoMauch | Fixed in Version | => 3.0PR19Q1 |
2018-12-11 20:22 | hudsonbot | Checkin | |
2018-12-11 20:22 | hudsonbot | Note Added: 0108418 | |
2018-12-11 20:22 | hudsonbot | Checkin | |
2018-12-11 20:22 | hudsonbot | Note Added: 0108419 |
Copyright © 2000 - 2009 MantisBT Group |