Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Mismatch between peer count and connection count in trimming logic #44

Closed
vyzo opened this issue May 14, 2019 · 1 comment · Fixed by #43
Closed

Mismatch between peer count and connection count in trimming logic #44

vyzo opened this issue May 14, 2019 · 1 comment · Fixed by #43

Comments

@vyzo
Copy link
Contributor

vyzo commented May 14, 2019

It has been observed in relays that the connection manager trims fewer connections than desired.
The explanation for this is a mismatch in the trim logic between peer and connection count.
We trigger the trim logic when the connection count exceeds the high water mark, but we trim using peer count - low water mark as target.
This breaks down in the presence of duplicate connections, and we may end up trimming less connections than desired.

@vyzo
Copy link
Contributor Author

vyzo commented May 14, 2019

See also libp2p/go-libp2p-swarm#123

vyzo added a commit that referenced this issue May 14, 2019
vyzo added a commit that referenced this issue May 17, 2019
@vyzo vyzo closed this as completed in #43 May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant