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

Unseq merge loss data after deletion

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.11.3
    • None

    Description

      (1) Use the folowing code to write data into 0.11.2:

      (2) delete from root.sg_1

      (3) Then rerun the following code

      (4) select count( * ) from root

      The count is less than 1000000.

       

      //代码占位符
      static List<Record> mockData(int loop) {
          List<Record> recordList = new ArrayList<>();
          int mockSize=10000;
          long timestamp = mockSize*loop;
          for (int r = 0; r < mockSize; r++) {
              Record record = new Record();
              String storageGroup = "root.sg_1";
              String deviceId = String.format("%s.device_1", storageGroup);
              record.setStorageGroup(storageGroup);
              record.setDeviceId(deviceId);
              record.setTimestamp(new Timestamp(timestamp+r));
              Record.Column column = new Record.Column("pressure", "Float", r%999.0f);
              record.addColumn(column);
              column = new Record.Column("temperature", "Float", r%37.0f);
              record.addColumn(column);
              recordList.add(record);
          }
          return recordList;
      }
      
      public static void main(String[] args) throws IoTDBConnectionException, StatementExecutionException {
      
          IOTDBReader iotdbReader = new IOTDBReader();
          Session session = iotdbReader.openSession();
          for (int loop = 0; loop < 100; loop++) {
              List<Record> recordList = mockData(loop);
              iotdbReader.insertTablet(session, recordList, loop);
              System.out.println(loop);
          }
          session.close();
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              qiaojialin Jialin Qiao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: