Siddhant Sangwan created HDDS-9747: -------------------------------------- Summary: Incorrect sorting order in RatisOverReplicationHandler Key: HDDS-9747 URL: https://issues.apache.org/jira/browse/HDDS-9747 Project: Apache Ozone Issue Type: Sub-task Components: SCM Reporter: Siddhant Sangwan Assignee: Siddhant Sangwan
{code} if (allUnhealthy) { // prefer deleting replicas with lower sequence IDs return replicas.stream() .sorted(Comparator.comparingLong(ContainerReplica::getSequenceId) .reversed()) .collect(Collectors.toList()); } {code} 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. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org