Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding content with local=true causes allocation imbalances #1765

Open
hsanjuan opened this issue Sep 16, 2022 · 0 comments
Open

Adding content with local=true causes allocation imbalances #1765

hsanjuan opened this issue Sep 16, 2022 · 0 comments
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up status/blocked Unable to be worked further until needs are met

Comments

@hsanjuan
Copy link
Collaborator

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.

@hsanjuan hsanjuan added kind/bug A bug in existing code (including security flaws) status/blocked Unable to be worked further until needs are met P1 High: Likely tackled by core team if no one steps up labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

No branches or pull requests

1 participant