Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7759 Improve Ozone Replication Manager
  3. HDDS-8617

Ratis underreplication due to maintenance is not deprioritised

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.4.0
    • SCM

    Description

      According to the following javadoc, both decommission and maintenance replicas should be deprioritised:

          /**
           * The weightedRedundancy, is the remaining redundancy + the requeue count.
           * When this value is used for ordering in a priority queue it ensures the
           * priority is reduced each time it is requeued, to prevent it from blocking
           * other containers from being processed.
           * Additionally, so that decommission and maintenance replicas are not
           * ordered ahead of under-replicated replicas, a redundancy of
           * DECOMMISSION_REDUNDANCY is used for the decommission redundancy rather
           * than its real redundancy.
           * @return The weightedRedundancy of this result.
           */
          public int getWeightedRedundancy() {
            int result = requeueCount;
            if (dueToDecommission) {
              result += DECOMMISSION_REDUNDANCY;
            } else {
              result += getRemainingRedundancy();
            }
            return result;
          }
      

      but dueToDecommission=true is set only based on decommission replicas, ignoring maintenance replicas (maintenanceCount):

        /**
         * Checks whether insufficient replication is because of some replicas
         * being on datanodes that were decommissioned.
         * @param includePendingAdd if pending adds should be considered
         * @return true if there is insufficient replication and it's because of
         * decommissioning.
         */
        public boolean inSufficientDueToDecommission(boolean includePendingAdd) {
          if (isSufficientlyReplicated(includePendingAdd)) {
            return false;
          }
          int delta = redundancyDelta(true, includePendingAdd);
          return decommissionCount >= delta;
        }
      

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: