Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019985Openbravo ERPA. Platformpublic2012-03-08 16:092012-04-01 20:39
alostale 
alostale 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP10 
Core
No
0019985: AlertActionHandler response is unnecessary big
Each 50s each client is sending a request to AlertActionHandler to obtain active alerts for current user/role. The response of to this request contains not only the counter of alerts but also the complete list of them.

In case of many active alerts, the response can be huge and the only used part is the counter. Increasing considerably the bandwidth used by Openbravo, note that this increases by each session.
-Add an alert rule that creates many alert instances
  *In alert window add the following alert:
    -Name: dummy
    -SQL: select ad_column_id as referencekey_id,
       name as record_id,
       0 as ad_role_id,
       null as ad_user_id,
       name ||' is a column' as description,
       'Y' as isActive,
        ad_org_id,
        ad_client_id,
        now() as created,
        0 as createdBy,
        now() as updated,
        0 as updatedBy
       from ad_column
    -Tab: Column - Tables and Columns
    -Assign System Admin role to this alert
-Login with System Admin. Check network calls to AlertActionHandler.
AlertActionHandler should return just the count of active alerts
No tags attached.
related to defect 0019989 closed alostale Having active alerts, application doesn't work in Oracle 
related to defect 00201463.0MP10 closed alostale AlertActionHandler PreparedStatement is not closed 
png Selection_041.png (28,644) 2012-03-08 17:11
https://issues.openbravo.com/file_download.php?file_id=5071&type=bug
png

png After_fix.png (33,727) 2012-03-08 17:27
https://issues.openbravo.com/file_download.php?file_id=5072&type=bug
png
Issue History
2012-03-08 16:09alostaleNew Issue
2012-03-08 16:09alostaleAssigned To => alostale
2012-03-08 16:09alostaleModules => Core
2012-03-08 17:11alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3253#r3253
2012-03-08 17:11alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3254#r3254
2012-03-08 17:11alostaleFile Added: Selection_041.png
2012-03-08 17:27alostaleFile Added: After_fix.png
2012-03-08 17:34alostaleNote Added: 0046207
2012-03-08 17:44hgbotCheckin
2012-03-08 17:44hgbotNote Added: 0046208
2012-03-08 17:44hgbotStatusnew => resolved
2012-03-08 17:44hgbotResolutionopen => fixed
2012-03-08 17:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/de657cf78aa790028cbf554fb4f19ddda3f26d97 [^]
2012-03-09 09:16alostaleRelationship addedrelated to 0019989
2012-03-09 09:20alostaleNote Added: 0046218
2012-03-16 16:42marvintmStatusresolved => closed
2012-03-29 10:58alostaleRelationship addedrelated to 0020146
2012-04-01 20:39hudsonbotCheckin
2012-04-01 20:39hudsonbotNote Added: 0047074

Notes
(0046207)
alostale   
2012-03-08 17:34   
This changeset does not introduce regression risk as the only part actually used in the response was the count which is the only preserved part.

Executed test plan.
-Ensure previous statement is true. This is not actually used anywhere else.
  * Code review of AlertActionHandler usage
  * Use Alert Management window by changing alert status
-Repeat steps to reproduce and check the difference:
  * The improvement depends on the actual number of active alerts for the user. In the example there are around 10K. The reductions are:
     * From 7.20MB to 205B in the response.
     * From ~1.3 seconds in the server to generate the response to ~30ms.
(0046208)
hgbot   
2012-03-08 17:44   
Repository: erp/devel/pi
Changeset: de657cf78aa790028cbf554fb4f19ddda3f26d97
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Mar 08 17:43:26 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/de657cf78aa790028cbf554fb4f19ddda3f26d97 [^]

fixed bug 19985: AlertActionHandler response is unnecessary big

  AlertActionHandler returns now just the count of active alerts, but not the complete list of them.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0046218)
alostale   
2012-03-09 09:20   
Note this fix introduces issue 0019989 in Oracle!
(0047074)
hudsonbot   
2012-04-01 20:39   
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/640de9acc2d5 [^]

Maturity status: Test