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

"io task meets error" is not handled correctly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.13.0, 0.12.5
    • None
    • None
    • 2022-5-StorageEngine

    Description

      When restarting IoTDB and flushing the wal, the io task meets error. 

      It throw a RuntimeException, however, this exception is not catched by TsFileProcessor, TsFileProcessor still ends the file, which causes a corrupt tsfile.

       

      2022-04-21 22:29:19,461 [pool-2-IoTDB-Flush-SubTask-2] ERROR o.a.i.d.e.f.MemTableFlushTask:297 - Storage group 2 memtable PrimitiveMemTable

      {planIndex=[0,0]}, io task meets error. 
      java.io.IOException: Bytes written is inconsistent with the size of data: 57 != 45
          at org.apache.iotdb.tsfile.write.chunk.ChunkWriterImpl.writeAllPagesOfChunkToTsFile(ChunkWriterImpl.java:459)
          at org.apache.iotdb.tsfile.write.chunk.ChunkWriterImpl.writeToFileWriter(ChunkWriterImpl.java:323)
          at org.apache.iotdb.db.engine.flush.MemTableFlushTask.lambda$new$0(MemTableFlushTask.java:290)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)

       

      2022-04-21 22:29:24,797 [Thread-4] INFO  o.a.i.d.e.f.MemTableFlushTask:150 - Storage group 2 memtable PrimitiveMemTable{planIndex=[0,0]}

      flushing a memtable has finished! Time consumption: 5448ms 

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            haonan Haonan Hou
            qiaojialin Jialin Qiao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Agile

                Completed Sprint:
                2022-5-StorageEngine ended 05/Jun/22
                View on Board

                Slack

                  Issue deployment