Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023482Openbravo ERPA. Platformpublic2013-04-03 17:292013-04-29 10:35
shuehner 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0MP23 
AugustoMauch
Core
No
0023482: Problem in Alert Management window, when the quantity of alerts exceeds the quantity of 1000
When some part of the alerts shown in the AlertManagement window exceeds 1000 then the queries done for this window fail on oracle as oracle cannot execute an IN-clause having more then 1K values.

The application part doing the query is a datasource:
at org.openbravo.dal.service.OBQuery.list(OBQuery.java:112)
at org.openbravo.service.json.DataEntityQueryService.list(DataEntityQueryService.java:91)
at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:132)
at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:72)
at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:241)
at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:574)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

A logfile is attached showing the Hibernate_debug log containing an example of such an failing query.

This occurs in Oracle, when there is an Alert Rule with a Filter Clause having more than 1000 alert instances for the current user/role.

-Create an Alert Rule that generates more than 1000 alert instances
-Define for this Alert Rule a Filter Clause (i.e. 1=1)
-Try to open Alert Management window (from top bar)
-No data is loaded in any of the grids, the error reported in the description can be seen in the log
As quick fix: split the "IN" part of the query in chunks of at most 1000 elements.
No tags attached.
related to design defect 0023490 new AugustoMauch Alert Management window doesn't scale 
log alert-management-window.log (145,036) 2013-04-03 17:29
https://issues.openbravo.com/file_download.php?file_id=6062&type=bug
diff 23482.diff (2,627) 2013-04-04 12:35
https://issues.openbravo.com/file_download.php?file_id=6067&type=bug
Issue History
2013-04-03 17:29shuehnerNew Issue
2013-04-03 17:29shuehnerAssigned To => alostale
2013-04-03 17:29shuehnerModules => Core
2013-04-03 17:29shuehnerTriggers an Emergency Pack => No
2013-04-03 17:29shuehnerFile Added: alert-management-window.log
2013-04-04 12:32alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4551#r4551
2013-04-04 12:32alostaleProposed Solution updated
2013-04-04 12:35alostaleFile Added: 23482.diff
2013-04-04 12:35alostaleNote Added: 0057726
2013-04-04 12:35alostaleReview Assigned To => AugustoMauch
2013-04-04 12:51alostaleRelationship addedrelated to 0023490
2013-04-09 15:29hgbotCheckin
2013-04-09 15:29hgbotNote Added: 0057803
2013-04-09 15:29hgbotStatusnew => resolved
2013-04-09 15:29hgbotResolutionopen => fixed
2013-04-09 15:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d3651e2ab4bda740118d29362150aa44dfd7192f [^]
2013-04-16 19:18hudsonbotCheckin
2013-04-16 19:18hudsonbotNote Added: 0057940
2013-04-29 10:35AugustoMauchNote Added: 0058296
2013-04-29 10:35AugustoMauchStatusresolved => closed
2013-04-29 10:35AugustoMauchFixed in Version => 3.0MP23

Notes
(0057726)
alostale   
2013-04-04 12:35   
Attached patch till pi is unfrozen
(0057803)
hgbot   
2013-04-09 15:29   
Repository: erp/devel/pi
Changeset: d3651e2ab4bda740118d29362150aa44dfd7192f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Apr 04 12:33:39 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d3651e2ab4bda740118d29362150aa44dfd7192f [^]

fixed bug 23482: Alert Management fails in ORA having more than 1000 alerts
if those alerts belong to Alert Rules with a Filter Clause

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js
---
(0057940)
hudsonbot   
2013-04-16 19: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/8df08bea850d [^]

Maturity status: Test
(0058296)
AugustoMauch   
2013-04-29 10:35   
Code reviewed and verified in pi@5e5dd4a8b5c0