private void checkPartition(List<MessageInfo> infos) {
    for (MessageInfo info : infos) {
      StoreKey storeKey = info.getStoreKey();
      if (storeKey instanceof BlobId && replicaId != null) {
        BlobId blobId = (BlobId) storeKey;
        if (blobId.getPartition().getId() != replicaId.getPartitionId().getId()) {
          metrics.blobPartitionUnmatchError.inc();
          throw new IllegalArgumentException(
              "WriteSet contains unexpected blob id : " + info.getStoreKey() + ", it belongs to partition "
                  + blobId.getPartition() + " but this blobstore's partition is " + replicaId.getPartitionId());
        }
      }
    }
  }
Sanity check, make sure all blobs belong to this partition.
@param infos The list of {@link MessageInfo} to check partition
ambry-store/src/main/java/com/github/ambry/store/BlobStore.java