private int getCompressedByteBufferSize(int size) {
    return ICompressor.getCompressor(CompressionType.LZ4).getMaxBytesForCompression(size);
  }
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