@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LogSegmentData that = (LogSegmentData) o;
        return Objects.equals(logSegment, that.logSegment) &&
               Objects.equals(offsetIndex, that.offsetIndex) &&
               Objects.equals(timeIndex, that.timeIndex) &&
               Objects.equals(transactionIndex, that.transactionIndex) &&
               Objects.equals(producerSnapshotIndex, that.producerSnapshotIndex) &&
               Objects.equals(leaderEpochIndex, that.leaderEpochIndex);
    }
@return Leader epoch index until this segment.
storage/api/src/main/java/org/apache/kafka/server/log/remote/storage/LogSegmentData.java