Skip to content

Adding content with local=true causes allocation imbalances #1765

Open
@hsanjuan

Description

When adding with local=true, we ensure that the local peer is among the dag-service destinations which become the pin allocations. That ensures that the peer on which the content is added will become one of the pinners. This is done here by replacing the last allocation with the local peer ID.

But this is actually very naïve and breaks the balanced allocations setup as we have no idea what peer we are replacing. We can end up with pins allocated multiple times to the same region for this reason.

Editing the allocations for the pin should not happen here. Destinations should be correctly set from the moment things are allocated. The local peer should just be a priority peer when local=true is set. This is related to #1764 as well, as that should be fixed in advanced.

Metadata

Assignees

No one assigned

    Labels

    P1High: Likely tackled by core team if no one steps upkind/bugA bug in existing code (including security flaws)status/blockedUnable to be worked further until needs are met

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions