public void add(int size, long searchIndex, long memTableId) {
    if (buffersSize.isEmpty()) {
      firstSearchIndex = searchIndex;
    }
    buffersSize.add(size);
    memTablesId.add(memTableId);
  }
Metadata exists at the end of each wal file, including each entry's size, search index of first
entry and the number of entries.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java