Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Implemented
-
None
-
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
- links to