Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-8699 Further Replication Manager Improvements
  3. HDDS-9747

Incorrect sorting order for all unhealthy replicas in RatisOverReplicationHandler

    XMLWordPrintableJSON

Details

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

    Description

          if (allUnhealthy) {
            // prefer deleting replicas with lower sequence IDs
            return replicas.stream()
                .sorted(Comparator.comparingLong(ContainerReplica::getSequenceId)
                    .reversed())
                .collect(Collectors.toList());
          }
      

      This should actually be the opposite, allowing lower sequence IDs to be deleted first. Also need to consider what happens when two replicas have the same sequence ID - how are ties broken? Consistent ordering matters in case of SCM failover.

      Attachments

        Issue Links

          Activity

            People

              sodonnell Stephen O'Donnell
              siddhant Siddhant Sangwan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: