You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Tian Jiang (Jira)" <ji...@apache.org> on 2021/03/30 12:01:00 UTC

[jira] [Commented] (IOTDB-1266) SHOW TIMESERIES will only display 2000 timeseries

    [ https://issues.apache.org/jira/browse/IOTDB-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17311459#comment-17311459 ] 

Tian Jiang commented on IOTDB-1266:
-----------------------------------

`So for the second iteration, after return 1000 timeseries from showTimeSeriesResults, it will end.`
I am still not clear why it will end, could you please explain it further?

As for why setting offset to 0, it is because the coordinator cannot know the proper offset for sub-plans.
For example, three nodes each hold one timeseries, ts1, ts2, ts3, respectively. And the query has no limit but an offset of 1. It expected result should be "ts2, ts3", where "ts1" is filtered by offset. However, if you set the offset of the sub-plan to 1, no result will be returned since each node will filter out its only timeseries. So we cannot set limit and offset in the sub-plans, and we must let the coordinator gather the results and then apply the offset and limit.

There are two optimizations that can be done. 1. Limit of the sub-plans can be set to `limit + offset` and the correctness is still guaranteed. 2. The coordinator can cache the results for further fetch.

> SHOW TIMESERIES will only display 2000 timeseries
> -------------------------------------------------
>
>                 Key: IOTDB-1266
>                 URL: https://issues.apache.org/jira/browse/IOTDB-1266
>             Project: Apache IoTDB
>          Issue Type: Improvement
>          Components: Cluster
>            Reporter: Yifu Zhou
>            Assignee: Yifu Zhou
>            Priority: Major
>             Fix For: 0.12.0
>
>
> The BUG is in the applyShowTimeseriesLimitOffset method. If there are 10000 timeseries data, when first time go in this method, and the default limit is 1000, offset is 0, showTimeSeriesResults will only return 1000 timeseries. For the reason that 10000 > 1000(limit+offset), so it will do the second iteration. And now offset is set to 1000. Once the offset != 0, it will do plan.setOffset(0) and plan.setLimit(0). So for the second iteration, after return 1000 timeseries from showTimeSeriesResults, it will end. 
> In my opinion, it is useless for the applyShowTimeseriesLimitOffset method... If the default limit is 1000, it means that if we have 10000 timeseries, we have to do 10 times iterations, and each iteration we need to fetch the timeseries data from all the servers.
> I think there are two ways, one is to keep this applyShowTimeseriesLimitOffset method and fix the plan.setOffset(0)(I am confused what why we have to set it 0), the other is remove applyShowTimeseriesLimitOffset because I think it is useless...
> Any idea here?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)