@Override
  public void write(WALEntry walEntry) {
    if (isClosed) {
      logger.warn(
          "Fail to write WALEntry into wal node-{} because this node is closed. It's ok to see this log during data region deletion.",
          identifier);
      walEntry.getWalFlushListener().fail(new WALNodeClosedException(identifier));
      return;
    }
    // just add this WALEntry to queue
    try {
      walEntries.put(walEntry);
    } catch (InterruptedException e) {
      logger.warn("Interrupted when waiting for adding WALEntry to buffer.");
      Thread.currentThread().interrupt();
    }
  }
two buffers switch between three statuses (there is always 1 buffer working).
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java