private void registerTsFileResourceToResourceManager(TsFileResource resource) {
    TsFileResourceStatus status = resource.getStatus();
    if (status != TsFileResourceStatus.UNCLOSED && status != TsFileResourceStatus.DELETED) {
      TsFileResourceManager.getInstance().registerSealedTsFileResource(resource);
    }
  }
Insert tsFileResource to a target pos(targetPos = insertPos) e.g. if insertPos = 0, then to the
first, if insert Pos = 1, then to the second.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileManager.java