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

WIP Have relay actor remove itself from clients #3103

Closed

Conversation

PaulOlteanu
Copy link
Contributor

@PaulOlteanu PaulOlteanu commented Jan 8, 2025

Description

Still WIP.

It seems to me that if a relay client actor errors almost anywhere (for example when reading from the connection to the client, which happens all the time) then that Client never gets removed from the Clients unless someone else tries sending a message to that node.

The ConnectionId thing is a pattern I've found useful for handling connection replacements. When the new connection gets put into the Clients list and then the old one gets shutdown, if we didn't check the connection id then the old connection would remove the new one from the list.

Also I haven't tested these changes at all, just interested in getting thoughts on them

Breaking Changes

None?

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

dignifiedquire added a commit that referenced this pull request Jan 8, 2025
Bring back `connection_id`s and ensure that client connections remove themselves from the clients list when they are done.

Before, as pointed out in #3103 connections would not be cleaned up if no messages were sent to them anymore.

Based on #3103
@dignifiedquire
Copy link
Contributor

created #3105 as a follow up

github-merge-queue bot pushed a commit that referenced this pull request Jan 8, 2025
## Description

Bring back `connection_id`s and ensure that client connections remove
themselves from the clients list when they are done.

Before, as pointed out in #3103 connections would not be cleaned up if
no messages were sent to them anymore.

Based on #3103



<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
@PaulOlteanu PaulOlteanu closed this Jan 8, 2025
@PaulOlteanu PaulOlteanu deleted the relay-actor-client-removal branch January 9, 2025 06:23
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