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 manage lifecycle of outgoing connections #77253

Closed

Conversation

DaveCTurner
Copy link
Contributor

Working towards a fix for #67873; just opening this so that CI can tell me how badly I broke other stuff.

@DaveCTurner DaveCTurner added the :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. label Sep 3, 2021
@DaveCTurner DaveCTurner force-pushed the 2021-09-03-releasable-connections branch 11 times, most recently from ec2dd05 to 5c0937d Compare September 5, 2021 09:29
Today we open connections to other nodes in various places and largely
assume that they remain open as needed, only closing them when applying
a cluster state that removes the remote node from the cluster. This
isn't ideal: we might preserve unnecessary connections to remote nodes
that aren't in the cluster if they never manage to join the cluster, and
we might also disconnect from a node that left the cluster while it's in
the process of re-joining too (see #TODO).

With this commit we move to a model in which each user of a connection
to a remote node acquires a reference to the connection that must be
released once it's no longer needed. Connections remain open while there
are any live references, but are now actively closed when all references
are released.

Fixes #TODO
@DaveCTurner DaveCTurner force-pushed the 2021-09-03-releasable-connections branch from 4d0c1c9 to 8e2a625 Compare September 5, 2021 14:22
@DaveCTurner DaveCTurner force-pushed the 2021-09-03-releasable-connections branch 2 times, most recently from ba4a63f to a154fcc Compare September 5, 2021 18:35
@DaveCTurner DaveCTurner force-pushed the 2021-09-03-releasable-connections branch from a154fcc to c03efe1 Compare September 5, 2021 18:49
@DaveCTurner
Copy link
Contributor Author

Closing in favour of #77295

@DaveCTurner DaveCTurner closed this Sep 6, 2021
@DaveCTurner DaveCTurner deleted the 2021-09-03-releasable-connections branch September 6, 2021 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v8.0.0-alpha2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants