public void resolvePartitionStatus() {
    boolean isPartiallySealed = false;
    for (ReplicaId replicaId : replicaIds) {
      if (replicaId.isSealed()) {
        // If at least one of the replicas of a partition is sealed then the entire parition is READ_ONLY.
        partitionState = PartitionState.READ_ONLY;
        return;
      }
      if (replicaId.isPartiallySealed()) {
        isPartiallySealed = true;
      }
    }
    // None of the partitions are sealed, so isPartiallySealed determines the state.
    partitionState = isPartiallySealed ? PartitionState.PARTIAL_READ_WRITE : PartitionState.READ_WRITE;
  }
Resolve the partition's status based on its replica's statuses.
If any one replica of a partition is {@link ReplicaSealStatus#SEALED}, then the partition is READ_ONLY.
If all the replicas are {@link ReplicaSealStatus#NOT_SEALED}, then the partition is READ_WRITE.
Otherwise, the partition is PARTIAL_READ_WRITE.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockPartitionId.java