You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/12/12 09:35:47 UTC

[GitHub] [iotdb] ep1github opened a new issue, #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

ep1github opened a new issue, #8421:
URL: https://github.com/apache/iotdb/issues/8421

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
   
   
   ### Version
   
   IoTDB v1.0.0 standalone
   
   ### Describe the bug and provide the minimal reproduce step
   
   REST-API call create exception on "downsampling aggregate query" when time range with no data is selected
   
   Step to reproduce bug:
   `create database root.db1
    create timeseries root.db1.dev1.sensor1 with datatype=DOUBLE
   `
   Make REST-API call 'select count(sensor1) from root.db1.dev1 group by ([2022-12-01T00:00:00, 2022-12-02T00:00:00),1d)'
   
   `
   2022-12-10 10:29:18,291 [qtp1430861186-79] WARN  o.a.i.d.p.r.h.ExceptionHandler:85 - null 
   java.lang.NullPointerException: null
   	at org.apache.iotdb.db.protocol.rest.handler.QueryDataSetHandler.fillQueryDataSetWithTimestamps(QueryDataSetHandler.java:181)
   	at org.apache.iotdb.db.protocol.rest.handler.QueryDataSetHandler.fillDataSetWithTimestamps(QueryDataSetHandler.java:78)
   	at org.apache.iotdb.db.protocol.rest.handler.QueryDataSetHandler.fillQueryDataSet(QueryDataSetHandler.java:60)
   	at org.apache.iotdb.db.protocol.rest.impl.RestApiServiceImpl.executeQueryStatement(RestApiServiceImpl.java:173)
   	at org.apache.iotdb.db.protocol.rest.RestApi.executeQueryStatement(RestApi.java:85)
   	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
   	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
   	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
   	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
   	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
   	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
   	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
   	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
   	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
   	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
   	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
   	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
   	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
   	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
   	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
   	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
   	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
   	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
   	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
   	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
   	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
   	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
   	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
   	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
   	at org.apache.iotdb.db.protocol.rest.filter.ApiOriginFilter.doFilter(ApiOriginFilter.java:37)
   	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
   	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
   	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
   	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
   	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
   	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
   	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
   	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
   	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
   	at org.eclipse.jetty.server.Server.handle(Server.java:516)
   	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
   	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
   	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
   	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
   	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
   	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
   	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
   	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
   	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
   	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
   	at java.lang.Thread.run(Thread.java:748)
   `
   
   ### What did you expect to see?
   
   REST-API call return HTTP status code 200 with payload `{'code': 305, 'message': None}`
   
   ### What did you see instead?
   
   REST-API call return HTTP status code 200 with payload `{'expressions': ['count(root.db1.dev1.sensor1)'], 'column_names': None, 'timestamps': None, 'values': []}`
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] ep1github commented on issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
ep1github commented on issue #8421:
URL: https://github.com/apache/iotdb/issues/8421#issuecomment-1362574301

   Great - can you point me to the branch/commit which fix the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou closed issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
HTHou closed issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected
URL: https://github.com/apache/iotdb/issues/8421


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] ep1github commented on issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
ep1github commented on issue #8421:
URL: https://github.com/apache/iotdb/issues/8421#issuecomment-1374426335

   @CloudWise-Lukemiao
   The error is unfortunately **not** yet fixed.
   I have cecked the issue against the current rel/1.0 branch and the error message is unchanged.
   Attention: the error concerns **only the REST-API**.
   This issue is _**knocking down the datanode**_ when many clients do "downsampling aggregations" requests by selecting a time range with no data.
   
   How to reproduce the issue:
   1. Create a new database + new timeseries using iotdb-cli
   ```
       create database root.db1
       create timeseries root.db1.dev1.sensor1 with datatype=DOUBLE
   ```
   2. Run the python example
   ```
   import requests
   
   headers = {"Authorization": "Basic cm9vdDpyb2901"}
   sql = "select count(sensor1) from root.db1.dev1 group by ([2022-12-01T00:00:00, 2022-12-02T00:00:00),1d)"
   r = requests.post('http://127.0.0.1:28080/rest/v1/query', json={"sql": sql}, headers=headers)
   print(r.json())
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] github-actions[bot] commented on issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #8421:
URL: https://github.com/apache/iotdb/issues/8421#issuecomment-1346166702

   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] CloudWise-Lukemiao commented on issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
CloudWise-Lukemiao commented on issue #8421:
URL: https://github.com/apache/iotdb/issues/8421#issuecomment-1361009658

   Hello, the problem has been fixed. If there is no data during the downsampling, it will be filled with 0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] CloudWise-Lukemiao commented on issue #8421: [Bug] REST-API exception on "downsampling aggregate query" when time range with no data is selected

Posted by GitBox <gi...@apache.org>.
CloudWise-Lukemiao commented on issue #8421:
URL: https://github.com/apache/iotdb/issues/8421#issuecomment-1362579253

   > Great - can you point me to the branch/commit which fix the issue.
   
   The rel/1.0 branch in the warehouse has fixed this problem. You can compile a package to try


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org