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

De-duplicate peer connections during replication session updates #525

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Aug 25, 2023

Because peers listen on multiple local network addresses and often on discovery dial each other concurrently, it's very hard to set a "one connection per-peer" limit on established connections (we have managed to limit it to max two connections now, one as listener, one as dialer). We can however filter out any duplicate connections when choosing peers to initiate replication sessions with.

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Patch coverage: 90.90% and no project coverage change.

Comparison is base (51d37b6) 92.30% compared to head (1c92dc3) 92.31%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #525   +/-   ##
=======================================
  Coverage   92.30%   92.31%           
=======================================
  Files         102      102           
  Lines       16070    16073    +3     
=======================================
+ Hits        14834    14837    +3     
  Misses       1236     1236           
Files Changed Coverage Δ
aquadoggo/src/replication/service.rs 75.64% <90.90%> (+0.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sandreae sandreae marked this pull request as ready for review August 25, 2023 10:29
@sandreae sandreae linked an issue Aug 25, 2023 that may be closed by this pull request
@sandreae sandreae changed the base branch from config-galore to main August 25, 2023 11:00
@sandreae sandreae merged commit 898cdd6 into main Aug 25, 2023
10 checks passed
@adzialocha adzialocha deleted the dedup-peers-in-replication branch August 25, 2023 11:25
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.

De-duplicate peers when selecting targets in replication service
2 participants