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

[Stability] Fix GC for tasks #2235

Merged
merged 6 commits into from
Dec 14, 2023
Merged

[Stability] Fix GC for tasks #2235

merged 6 commits into from
Dec 14, 2023

Conversation

rob-maron
Copy link
Collaborator

This PR:

Addresses a slow memory leak where we are not removing tasks from the task map. It does this by:

  • adding a new type TaskMap that is basically a type alias for what we had
  • impls a function prune_tasks that takes a generator for the event and the view number and cleans up
  • uses this function for every task map

This PR does not:

Fix the entirety of the memory leak issue.

Key places to review:

web_server_network.rs

I have tested that it cleans up all old tasks ✅

@rob-maron rob-maron marked this pull request as ready for review December 14, 2023 19:32
@rob-maron rob-maron merged commit c436836 into main Dec 14, 2023
9 checks passed
@rob-maron rob-maron deleted the rm/remove-cancelled-polls branch December 14, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants