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

avoid calls to WeightForSet for the same activeset #5765

Open
dshulyak opened this issue Mar 22, 2024 · 0 comments
Open

avoid calls to WeightForSet for the same activeset #5765

dshulyak opened this issue Mar 22, 2024 · 0 comments
Assignees

Comments

@dshulyak
Copy link
Contributor

image

we compute and cache weight for every unique activeset. but when we start a node, we ask peers for all missed ballots layer by layer.
if we receive them at the same time code will try to compute WeightForSet for each ballot individually. if the number of simulateneously processed ballots is large it may trigger huge memory allocation.

the solution should be to compute WeightForSet only for the first ballot, and the rest should subscribe and wait until that computation has finished.

@ivan4th ivan4th self-assigned this May 8, 2024
ivan4th added a commit that referenced this issue May 9, 2024
This fixes multiple concurrent retrievals of the same activeset from
the database that were causing high CPU and memory usage.

Fixes #5765
ivan4th added a commit that referenced this issue May 9, 2024
This fixes multiple concurrent retrievals of the same activeset from
the database that were causing high CPU and memory usage.

Fixes #5765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Next
2 participants