@GuardedBy("TsFileResource-WriteLock")
  public void truncate(long size) {
    writer.truncate(size);
  }
Write a modification in this file. The modification will first be written to the persistent
store then the memory cache. Notice that this method does not synchronize to physical disk
after

@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