You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Stephen O'Donnell (Jira)" <ji...@apache.org> on 2023/11/28 11:43:00 UTC
[jira] [Updated] (HDDS-9747) Incorrect sorting order for all unhealthy replicas in RatisOverReplicationHandler
[ https://issues.apache.org/jira/browse/HDDS-9747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen O'Donnell updated HDDS-9747:
------------------------------------
Summary: Incorrect sorting order for all unhealthy replicas in RatisOverReplicationHandler (was: Incorrect sorting order in RatisOverReplicationHandler)
> Incorrect sorting order for all unhealthy replicas 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
> Priority: Major
>
> {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-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org