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

improved async cancellation handling will require more hashmap management #754

Closed
garypen opened this issue Mar 29, 2022 · 0 comments · Fixed by #758
Closed

improved async cancellation handling will require more hashmap management #754

garypen opened this issue Mar 29, 2022 · 0 comments · Fixed by #758
Assignees

Comments

@garypen
Copy link
Contributor

garypen commented Mar 29, 2022

The fix (#752 ) for #550 resolves the immediate problem of the router hanging when cancelled tasks are re-encountered. However, the fix is "lazy", in that the HashMap which implements our wait_map is only cleaned up when the same request if re-submitted.

IRL a lot of different requests may be submitted and not cleaned up (if the requests are cancelled) which could lead to memory bloat.

We'd like to avoid that problem by managing the HashMaps and removing inaccessible broadcasters when we detect they are no longer required.

There are a variety of approaches we can use to solve this problem, including:

  • time based LRU cache with filter matching
  • periodic sweeps of the HashMap to remove stale entries
  • stale entry detection/removal at cancellation time
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 a pull request may close this issue.

3 participants