Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037601Openbravo ERPA. Platformpublic2018-01-09 08:052018-02-22 18:18
alostale 
alostale 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q2 
caristu
Core
No
0037601: log in causes contention in other requests
While OBContext is being initialized, that occurs during the back office log in process, any other request is not processed till it finishes.

0. To simulate slowness in OBContext initialization, apply attached diff.
1. Log in back office
    -> Note in openbravo.log appears "waiting" for 20 secons
2. During those 20 seconds, in another browser try to perform any operation (such as loading login page)
    -> ERROR: it gets frozen until the login has completed.
Performance
diff slow-37601.diff (955) 2018-01-09 08:10
https://issues.openbravo.com/file_download.php?file_id=11435&type=bug
Issue History
2018-01-09 08:05alostaleNew Issue
2018-01-09 08:05alostaleAssigned To => platform
2018-01-09 08:05alostaleModules => Core
2018-01-09 08:05alostaleTriggers an Emergency Pack => No
2018-01-09 08:06alostaleSummaryback office login causes contention in other requests => log in causes contention in other requests
2018-01-09 08:10alostaleFile Added: slow-37601.diff
2018-01-09 08:12alostaleTag Attached: Performance
2018-01-09 08:12alostaleReview Assigned To => caristu
2018-01-09 08:12alostaleAssigned Toplatform => alostale
2018-01-09 08:21hgbotCheckin
2018-01-09 08:21hgbotNote Added: 0101628
2018-01-09 08:21hgbotStatusnew => resolved
2018-01-09 08:21hgbotResolutionopen => fixed
2018-01-09 08:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d0f17b56bf6e9b28cfdd8fbe01777682b2846fbd [^]
2018-01-19 14:45caristuNote Added: 0101801
2018-01-19 14:45caristuStatusresolved => closed
2018-01-19 14:45caristuFixed in Version => 3.0PR18Q1
2018-01-22 11:17caristuFixed in Version3.0PR18Q1 => 3.0PR18Q2
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102650

Notes
(0101628)
hgbot   
2018-01-09 08:21   
Repository: erp/devel/pi
Changeset: d0f17b56bf6e9b28cfdd8fbe01777682b2846fbd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jan 08 18:25:25 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d0f17b56bf6e9b28cfdd8fbe01777682b2846fbd [^]

fixed bug 37601: log in causes contention in other requests

  OBContext.setOBContext static method was synchronized, it was invoked from DAL
  request filter at the begining of every requests causing contention. This method
  is also invoked during the log in process to intialize OBContext, if initalization
  takes time, it can cause severe contention issues.

  Now the synchronization occurs at session level so that 2 paralell requests for
  the same session are synchronized but any other request from other sessions is
  not.

---
M src/org/openbravo/dal/core/OBContext.java
---
(0101801)
caristu   
2018-01-19 14:45   
Reviewed
(0102650)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test