public long getCurrentCommitIndex(ConsensusPipeName consensusPipeName) {
    return Optional.ofNullable(consensusPipe2ConnectorMap.get(consensusPipeName))
        .map(ConsensusPipeConnector::getConsensusPipeCommitProgress)
        .orElse(0L);
  }
userWriteProgress - currentReplicateProgress. If res <= 0, indicating that replication is
finished.
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/pipe/metric/PipeConsensusSyncLagManager.java