Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-4343

ReplicationManager.handleOverReplicatedContainer() does not handle unhealthyReplicas properly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.0
    • SCM

    Description

            // If there are unhealthy replicas, then we should remove them even if it
            // makes the container violate the placement policy, as excess unhealthy
            // containers are not really useful. It will be corrected later as a
            // mis-replicated container will be seen as under-replicated.
            for (ContainerReplica r : unhealthyReplicas) {
              if (excess > 0) {
                sendDeleteCommand(container, r.getDatanodeDetails(), true);
                excess -= 1;
              }
              break;
            }
            // After removing all unhealthy replicas, if the container is still over
            // replicated then we need to check if it is already mis-replicated.
            // If it is, we do no harm by removing excess replicas. However, if it is
            // not mis-replicated, then we can only remove replicas if they don't
            // make the container become mis-replicated.
      

      From the comment, it wants to remove all unhealthy replicas until excess reach 0 ? It should be

            for (ContainerReplica r : unhealthyReplicas) {
              if (excess > 0) {
                sendDeleteCommand(container, r.getDatanodeDetails(), true);
                excess -= 1;
              } else {
                break;
              }
            }
      

      Attachments

        Issue Links

          Activity

            People

              glengeng Glen Geng
              glengeng Glen Geng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: