Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039023Openbravo ERPA. Platformpublic2018-07-24 12:272018-08-08 13:06
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q4 
caristu
Core
No
0039023: unneeded contention to count active alerts
Every few seconds a request to AlertActionHandler is performed, it serves 2 purposes:

1. Update ad_session table with current timestamp to mark "session last seen"
2. Count active alerts

They are executed in that order in a single db transaction, in case counting alerts takes long, locks on ad_session table are hold until it completes.
1. Define several alerts for a user, so that counting them takes some time
2. Check pg_locks while executing a AlertActionHandler request:
  -> It is kept till request is completed.
Commit ping transaction before starting counting alerts
Performance
related to defect 0039014 closed alostale unneeded queries to count active alerts 
Issue History
2018-07-24 12:27alostaleNew Issue
2018-07-24 12:27alostaleAssigned To => platform
2018-07-24 12:27alostaleModules => Core
2018-07-24 12:27alostaleTriggers an Emergency Pack => No
2018-07-24 12:27alostaleTag Attached: Performance
2018-07-24 12:27alostaleRelationship addedrelated to 0039014
2018-07-24 12:28alostaleReview Assigned To => caristu
2018-07-24 12:29hgbotCheckin
2018-07-24 12:29hgbotNote Added: 0105911
2018-07-24 12:29hgbotStatusnew => resolved
2018-07-24 12:29hgbotResolutionopen => fixed
2018-07-24 12:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3d151a1172b8de6feecd545c45f6766cad190414 [^]
2018-08-03 10:34caristuAssigned Toplatform => alostale
2018-08-03 10:35caristuNote Added: 0106153
2018-08-03 10:35caristuStatusresolved => closed
2018-08-03 10:35caristuFixed in Version => 3.0PR18Q4
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106222

Notes
(0105911)
hgbot   
2018-07-24 12:29   
Repository: erp/devel/pi
Changeset: 3d151a1172b8de6feecd545c45f6766cad190414
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 24 12:29:30 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3d151a1172b8de6feecd545c45f6766cad190414 [^]

fixed bug 39023: unneeded contention to count active alerts

  Commit transaction after updating ad_session so that locks on ad_session are not
  hold while counting active alerts

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0106153)
caristu   
2018-08-03 10:35   
Code reviewed + tested OK.
(0106222)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test