Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-1125

set ttl 与flush一起使用,顺序tsfile被delete导致查询Msg: 500: bitIndex < 0: -2147483648

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0, 0.11.2
    • 0.12.0
    • Core/Server
    • 0.11.3-SNAPSHOT

    Description

      干净的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;

      大概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;

      报错

       

      Attachments

        1. image-2021-01-25-18-13-30-909.png
          8 kB
          刘珍
        2. image-2021-01-25-18-13-34-397.png
          8 kB
          刘珍
        3. image-2021-01-25-18-15-40-631.png
          4 kB
          刘珍
        4. log_error.log
          5 kB
          刘珍
        5. log_info.log
          20 kB
          刘珍

        Issue Links

          Activity

            People

              wangchao316 Chao Wang
              刘珍 刘珍
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: