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

ReplicationManager: RatisUnderReplication handler should not sort sources by BCSID

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • 1.4.0
    • None

    Description

      In the RatisUnderReplicationHander, the sources are sorted by BSCIS, intending that the highest ID is used as the source for the replication:

          return replicaCount.getReplicas().stream()
              .filter(predicate)
              .filter(r -> {
                try {
                  return replicationManager.getNodeStatus(r.getDatanodeDetails())
                      .isHealthy();
                } catch (NodeNotFoundException e) {
                  return false;
                }
              })
              .filter(r -> !pendingDeletion.contains(r.getDatanodeDetails()))
              .sorted((r1, r2) -> r2.getSequenceId().compareTo(r1.getSequenceId()))
              .map(ContainerReplica::getDatanodeDetails)
              .collect(Collectors.toList());
      

      However, the list is later source by load for push replication, or shuffled for pull replication, so the sort is not having the intended effect.

      We should remove the sort here, but also consider if we should remove any sources that are not at the highest BCSID.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: