siddhi-io / siddhi

Stream Processing and Complex Event Processing Engine

Home Page:http://siddhi.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Persisted aggregations improve error handling and store query retrieval for Days -> Year throws null

dnwick opened this issue · comments

Description:

When persisted aggregation is enabled, when records are retrieved using store query for Days -> Year a null is thrown with following exception, and also need to improve error handling

[2021-05-27 02:06:22,010] ERROR {org.wso2.carbon.siddhi.store.api.rest.impl.StoresApiServiceImpl} - Error while querying for siddhiApp: APIM_ACCESS_SUMMARY, with query: from ApiResPathPerApp on(apiCreatorTenantDomain=='carbon.super') within 1619999900000L, 1622095151000L per 'days' select apiName, apiVersion, apiCreator, apiContext, apiMethod, sum(totalRequestCount) as total_request_count, apiResourceTemplate, AGG_TIMESTAMP group by apiName, apiVersion, apiCreator, apiContext, apiMethod, apiResourceTemplate; Error: Error executing 'store_select_query_ApiResPathPerApp', null org.wso2.siddhi.core.exception.StoreQueryCreationException: Error executing 'store_select_query_ApiResPathPerApp', null
at org.wso2.siddhi.core.SiddhiAppRuntime.query(SiddhiAppRuntime.java:310)
at org.wso2.siddhi.core.SiddhiAppRuntime.query(SiddhiAppRuntime.java:273)
at org.wso2.carbon.siddhi.store.api.rest.impl.StoresApiServiceImpl.query(StoresApiServiceImpl.java:66)
at org.wso2.carbon.siddhi.store.api.rest.StoresApi.query(StoresApi.java:78)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invokeResource(HttpMethodInfo.java:187)
at org.wso2.msf4j.internal.router.HttpMethodInfo.invoke(HttpMethodInfo.java:143)
at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.dispatchMethod(MSF4JHttpConnectorListener.java:218)
at org.wso2.msf4j.internal.MSF4JHttpConnectorListener.lambda$onMessage$0(MSF4JHttpConnectorListener.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.siddhi.core.exception.StoreQueryRuntimeException: Error executing 'store_select_query_ApiResPathPerApp', null
at org.wso2.siddhi.core.query.FindStoreQueryRuntime.execute(FindStoreQueryRuntime.java:110)
at org.wso2.siddhi.core.SiddhiAppRuntime.query(SiddhiAppRuntime.java:303)
... 13 more
Caused by: java.lang.ArrayIndexOutOfBoundsException

Affected Siddhi Version:

OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues: