sodonnel opened a new pull request, #5689:
URL: https://github.com/apache/ozone/pull/5689
## What changes were proposed in this pull request?
```
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. If all sequence IDs are the same, we should have a secondary
sort based on the containerReplica hashCode, which is already used for healthy
replicas.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9747
## How was this patch tested?
New unit tests added to reproduce the issue and validate the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]