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

[jira] [Commented] (IOTDB-1125) set ttl 与flush一起使用,顺序tsfile被delete导致查询Msg: 500: bitIndex < 0: -2147483648

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

Chao Wang commented on IOTDB-1125:
----------------------------------

[~刘珍]  Thanks  for submit this issue.

I will solved this issue.

> set ttl 与flush一起使用,顺序tsfile被delete导致查询Msg: 500: bitIndex < 0: -2147483648
> -------------------------------------------------------------------------
>
>                 Key: IOTDB-1125
>                 URL: https://issues.apache.org/jira/browse/IOTDB-1125
>             Project: Apache IoTDB
>          Issue Type: Bug
>          Components: Server
>         Environment: 0.11.3-SNAPSHOT
>            Reporter: 刘珍
>            Assignee: Chao Wang
>            Priority: Major
>         Attachments: image-2021-01-25-18-13-30-909.png, image-2021-01-25-18-13-34-397.png, image-2021-01-25-18-15-40-631.png, log_error.log, log_info.log
>
>
> 干净的IoTDB数据库
> create timeseries root.db_0.tab0.salary with datatype=INT64,encoding=REGULAR ;
> set ttl to root.db_0 100000;   --过期时间100秒
> insert 2条记录,时间为当前时间
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T18:01:01.000+08:00,1200);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T18:01:02.000+08:00,1200);
> 执行查询,可以查询到insert的2条记录。
> select * from root.db_0.tab0;
> !image-2021-01-25-18-13-34-397.png!
> 大概100秒后再次执行查询,查询结果为空。过期的记录不可见,表现正确。
> 执行
> FLUSH
> 可以看到data/data/sequence/root.db_0/0下的tsfile文件消失
> unset ttl to root.db_0;
> 再次执行查询
> select * from root.db_0.tab0;
> 查询结果为空,应该可以查询到,因为已经取消ttl。
> delete from root.db_0.tab0;
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:01.000+08:00,1200);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:02.000+08:00,1100);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:03.000+08:00,1000);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:04.000+08:00,2200);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:05.000+08:00,1300);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:06.000+08:00,1400);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:07.000+08:00,1500);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:08.000+08:00,1600);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:09.000+08:00,1700);
> insert into root.db_0.tab0(time ,salary) values(2021-01-25T17:36:10.000+08:00,1800);
> flush;
> select * from root.db_0.tab0;
> 报错
> !image-2021-01-25-18-15-40-631.png!
>  



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