Zoekt nodes with high watermark should destroy replicas when it has unclaimed storage below 0
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Every hour, we should:
- Sort nodes by unclaimed storage bytes in ascending order.
- We should loop over nodes in memory
- Each node figures out what indices in ascending order by reserved_bytes it needs to remove to have unclaimed storage at or above 0. We collect the replicas associated with these indices in an array of
replicas_to_remove - The next node in the loop should remove indices that belong to
replicas_to_removebefore proceeding to decide which replicas to add toreplicas_to_remove- scope:
indices.where.not(replica_id: replicas_to_remove)
- scope:
- Each node figures out what indices in ascending order by reserved_bytes it needs to remove to have unclaimed storage at or above 0. We collect the replicas associated with these indices in an array of
- All
replicas_to_removeare deleted in one database transaction
Edited by 🤖 GitLab Bot 🤖