public void updateLagMetricForRemoteReplica(RemoteReplicaInfo remoteReplicaInfo, long lag) {
    ReplicaId replicaId = remoteReplicaInfo.getReplicaId();
    // update the partition's lag if and only if it was tracked.
    partitionLags.computeIfPresent(replicaId.getPartitionId(), (k, v) -> {
      v.put(replicaId.getDataNodeId(), lag);
      return v;
    });
  }
Update the lag between local and {@link RemoteReplicaInfo}. The lag indicates how far local replica is behind remote
peer replica.
@param remoteReplicaInfo the remote replica
@param lag the new lag
ambry-replication/src/main/java/com/github/ambry/replication/ReplicationMetrics.java