Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.7.1
-
None
-
Reviewed
Description
Currently in BlockPlacementPolicyDefault.chooseReplicaToDelete() the logic for choosing replica to delete is to pick the node with the least free space(node.getRemaining()), if all hearbeats are within the tolerable heartbeat interval.
However, a node may have multiple storages and node.getRemaining() is a sum of the remainings of them, if free space of the storage with the block to be delete is low, free space of the node could still be high due to other storages of the node, finally the storage chosen may not be the storage with least free space.
So using storage.getRemaining() to choose a storage with least free space for choosing replica to delete may be a better way to balance storage usage.