boolean containsMissingKeysFromPreviousMetadataExchange(RemoteReplicaInfo remoteReplicaInfo) {
    ReplicaId localReplica = remoteReplicaInfo.getLocalReplicaId();
    ReplicaId remoteReplica = remoteReplicaInfo.getReplicaId();
    ExchangeMetadataResponse exchangeMetadataResponse = remoteReplicaInfo.getExchangeMetadataResponse();
    return !leaderBasedReplicationAdmin.isLeaderPair(localReplica, remoteReplica)
        && !exchangeMetadataResponse.isEmpty();
  }
Checks if the input remote replica and its corresponding local replica are not leaders of their partitions and
contains any messages from its previous metadata exchange still missing in local store, i.e. they haven't arrived
from leader via intra-dc replication.
@param remoteReplicaInfo remote replica information
@return true if missing messages in previous metadata exchange are not yet received
ambry-replication/src/main/java/com/github/ambry/replication/ReplicaThread.java