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

[compaction + delete] Merge recovery lost data

    XMLWordPrintableJSON

Details

    • 2022-3-Dragon

    Description

      iotdb版本0310 f133c92e202508e9bec4294cf56f34fc4e67ff9a
      问题描述:
      顺序空间内合并的时候,100个设备顺序执行delete 2条记录,执行完后,
      killall -u 当前用户,备份data,继续在这个data上重启iotdb,执行100个设备的count查询,
      查询结果有20个设备存在少数据的现象,每个序列的期望结果是199999998点。

      操作流程:
      1. 0.12.5-pre4 关合并,生成数据备份,记作备份1。
      在192.168.10.68的/data/liuzhen_test/1205_pre4/data_bk_close-comp
      2.copy 备份1 到68机器的/data/liuzhen_test/0310_master_f133c92
      2022-03-11 13:40:13,204启动成功
      2022-03-11 14:23:45,657 启动delete脚本(此时有顺序空间内合并)
      cat delete_when_comp.sh
      #!/bin/bash
      base_db_dir="/data/liuzhen_test/0309_master_iotdb-2693"
      out_dev="dev_name.txt"
      function expDevNameToFile()
      {
      ${base_db_dir}/sbin/start-cli.sh -e "set max_display_num=0 ;show devices;"|grep root|awk -F '|' '

      {print $2}

      '>${out_dev}
      }

      expDevNameToFile

      1. delete 2 row 1 of seq ,1 of unseq
        function del2rows()
        {
        while read LINE
        do
        ${base_db_dir}/sbin/start-cli.sh -e " select s_0 from "$LINE" where time=2024-05-24T18:00:05.000+08:00 or time=2034-01-24T18:53:22.000+08:00" >> sel.out
        ${base_db_dir}/sbin/start-cli.sh -e " delete from "$LINE".* where time=2034-01-24T18:53:22.000+08:00" >> sel.out
        ${base_db_dir}/sbin/start-cli.sh -e " delete from "$LINE".* where time=2024-05-24T18:00:05.000+08:00" >> sel.out
        ${base_db_dir}/sbin/start-cli.sh -e " select s_0 from "$LINE" where time=2024-05-24T18:00:05.000+08:00 or time=2034-01-24T18:53:22.000+08:00" >> sel.out
        echo $LINE

      done < ${out_dev}
      }
      del2rows

      delete 2条记录成功,delete后查询这2条记录是否存在,不存在,表现正确。
      脚本执行完,killall -u liuzhen

      备份data到/data/liuzhen_test/0310_master_f133c92/data_1_del-2rows-when-inner-comp-kill-u
      备份日志/data/liuzhen_test/0310_master_f133c92/logs.1_del-2rows-when-inner-comp-kill-u

      3. 启动iotdb
      启动成功后,再次执行查询2条已经delete的记录,不存在,通过。
      启动q.sh,查询每个设备的count,发现有20设备存在少数据的现象

      Attachments

        1. screenshot-1.png
          60 kB
          刘珍
        2. q.sh
          8 kB
          刘珍

        Activity

          People

            ThuLiuxuxin Liuxuxin
            刘珍 刘珍
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: