private void recordStartIndex(final File file, final long position) {
    final Long id = currentConnectionId.get();
    if (id != null) {
      final Map<String, Long> map =
          connectionIdToStartIndexRecord.computeIfAbsent(id, i -> new ConcurrentHashMap<>());
      map.put(file.getAbsolutePath(), position);
    }
  }
Get current FileStartIndex.

@return startIndex of file: -1 if file doesn't exist
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java