@Override
  public boolean equals(ProgressIndex progressIndex) {
    lock.readLock().lock();
    try {
      if (!(progressIndex instanceof TimeWindowStateProgressIndex)) {
        return false;
      }

      final TimeWindowStateProgressIndex thisTimeWindowStateProgressIndex = this;
      final TimeWindowStateProgressIndex thatTimeWindowStateProgressIndex =
          (TimeWindowStateProgressIndex) progressIndex;
      return thisTimeWindowStateProgressIndex.timeSeries2TimestampWindowBufferPairMap.equals(
          thatTimeWindowStateProgressIndex.timeSeries2TimestampWindowBufferPairMap);
    } finally {
      lock.readLock().unlock();
    }
  }
NOTE: Currently, {@link TimeWindowStateProgressIndex} does not perform deep copies of the {@link
ByteBuffer} and {@link Pair} during construction or when exposed through accessors, which may
lead to unintended shared state or modifications. This behavior should be reviewed and adjusted
as necessary to ensure the integrity and independence of the progress index instances.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/TimeWindowStateProgressIndex.java