protected static ProgressIndex blendProgressIndex(
      ProgressIndex progressIndex1, ProgressIndex progressIndex2) {
    if (progressIndex1 == null && progressIndex2 == null) {
      return MinimumProgressIndex.INSTANCE;
    }
    if (progressIndex1 == null || progressIndex1 instanceof MinimumProgressIndex) {
      return progressIndex2 == null ? MinimumProgressIndex.INSTANCE : progressIndex2;
    }
    if (progressIndex2 == null || progressIndex2 instanceof MinimumProgressIndex) {
      return progressIndex1; // progressIndex1 is not null
    }

    return progressIndex1 instanceof StateProgressIndex
        ? progressIndex1.updateToMinimumEqualOrIsAfterProgressIndex(progressIndex2)
        : new HybridProgressIndex(progressIndex1)
            .updateToMinimumEqualOrIsAfterProgressIndex(progressIndex2);
  }
Blend two {@link ProgressIndex}es together, the result progress index should satisfy:

<p>(result.equals(progressIndex1) || result.isAfter(progressIndex1)) is true

<p>(result.equals(progressIndex2) || result.isAfter(progressIndex2)) is true

<p>There is no R, such that R satisfies the above conditions and result.isAfter(R) is true

<p>Note: this function will not modify {@param progressIndex1} and {@param progressIndex2}.

@param progressIndex1 the first {@link ProgressIndex}. if it is {@code null}, the result {@link
    ProgressIndex} should be the second {@link ProgressIndex}. if it is a {@link
    MinimumProgressIndex}, the result {@link ProgressIndex} should be the second {@link
    ProgressIndex}. (if the second {@link ProgressIndex} is {@code null}, the result should be
    a {@link MinimumProgressIndex}). if it is a {@link HybridProgressIndex}, the result
    progress index should be the minimum {@link ProgressIndex} after the second {@link
    ProgressIndex} and the first {@link ProgressIndex}
@param progressIndex2 the second {@link ProgressIndex}. if it is {@code null}, the result
    {@link ProgressIndex} should be the first {@link ProgressIndex}. if it is a {@link
    MinimumProgressIndex}, the result {@link ProgressIndex} should be the first {@link
    ProgressIndex}. (if the first {@link ProgressIndex} is null, the result should be a minimum
    progress index). if it is a {@link HybridProgressIndex}, the result {@link ProgressIndex}
    should be the minimum {@link ProgressIndex} equal or after the first {@link ProgressIndex}
    and the second {@link ProgressIndex}
@return the minimum {@link ProgressIndex} after the first {@link ProgressIndex} and the second
    {@link ProgressIndex}.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/ProgressIndex.java