public void write(Modification mod) throws IOException {
    synchronized (this) {
      if (needVerify && new File(filePath).exists()) {
        writer.mayTruncateLastLine();
        needVerify = false;
      }
      writer.write(mod);
    }
  }
Write a modification in this file. The modification will first be written to the persistent
store then the memory cache.

@param mod the modification to be written.
@throws IOException if IOException is thrown when writing the modification to the store.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/ModificationFileV1.java