Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Jira number:[IOTDB-1136] Improved reliability in flush error

current , have some question:

1.   throw exception after flush error,  TsFileProcessor catch exception set read-only mode and thread interrupt.

2. after flush error, only  "Thread.currentThread().interrupt()",   thread continue execute, delete WAL , which lead to data lost... 


Solution:

step1:after flush error, write reset, which will truncate markedPosition data

step2: add retry mechanism, retry flush data..  default retry 3 times, interval 1s.

step3: if there is error after retry, throw exception which does not execute delete WAL etc.. and set onlyread mode to true

step4:trigger only read mode recovery,  will close all tsfile. as the same, default retry 3 times,  interval 10 min(The configuration file can be modified),  there is long time...

step5: if close all tsfile success,  will set only-read to false.