@Override
  public void serialize(IWALByteBufferView buffer) {
    buffer.put(type.getCode());
    buffer.putLong(memTableId);
    switch (type) {
      case INSERT_TABLET_NODE:
        ((InsertTabletNode) value).serializeToWAL(buffer, tabletInfo.tabletRangeList);
        break;
      case INSERT_ROW_NODE:
      case INSERT_ROWS_NODE:
      case DELETE_DATA_NODE:
      case RELATIONAL_DELETE_DATA_NODE:
      case MEMORY_TABLE_SNAPSHOT:
      case CONTINUOUS_SAME_SEARCH_INDEX_SEPARATOR_NODE:
        value.serializeToWAL(buffer);
        break;
      case MEMORY_TABLE_CHECKPOINT:
        throw new RuntimeException("Cannot serialize checkpoint to wal files.");
      default:
        throw new RuntimeException("Unsupported wal entry type " + type);
    }
  }
This entry class stores info for persistence.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALInfoEntry.java