You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/12/14 08:34: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 ]

Attila Doroszlai updated HDDS-9747:
-----------------------------------
    Fix Version/s: 1.4.0

> 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: Stephen O'Donnell
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.4.0
>
>
> {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