@Override
  public void close() throws IOException {
    if (writer != null) {
      writer.close();
    }
  }
Recover TsFile with RestorableTsFileIOWriter, including load .resource file (reconstruct when
necessary) and truncate the file to remaining corrected data. <br>
Notice: this method may open a {@link RestorableTsFileIOWriter}, remember to close it.

@throws DataRegionException when failing to new RestorableTsFileIOWriter.
@throws IOException when failing to read .resource file.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/AbstractTsFileRecoverPerformer.java