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

[bitswap/peermanager] take read-lock for read-only operation #755

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Dec 14, 2024

Previously a read-only PeerManager operation was was protected by write-lock. This could have caused for the operation to block unnecessarily waiting for a write-lock.

There was also an instance of this with the PeerManager's session lock.

Previously a read-only operations was was protected by write-lock. This could have caused for the operation to block unnecessarily waiting for a write-lock.
@gammazero gammazero requested a review from a team as a code owner December 14, 2024 10:43
Copy link

codecov bot commented Dec 14, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 60.43%. Comparing base (2a26bf9) to head (274f634).

Files with missing lines Patch % Lines
...tswap/client/internal/session/sessionwantsender.go 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   60.32%   60.43%   +0.10%     
==========================================
  Files         245      245              
  Lines       31115    31112       -3     
==========================================
+ Hits        18771    18802      +31     
+ Misses      10670    10642      -28     
+ Partials     1674     1668       -6     
Files with missing lines Coverage Δ
bitswap/client/internal/peermanager/peermanager.go 91.85% <100.00%> (ø)
...tswap/client/internal/session/sessionwantsender.go 96.94% <0.00%> (+0.91%) ⬆️

... and 12 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant