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: messagequeue: lock only needed sections #787

Merged
merged 1 commit into from
Jan 15, 2025
Merged

bitswap: messagequeue: lock only needed sections #787

merged 1 commit into from
Jan 15, 2025

Conversation

hsanjuan
Copy link
Contributor

A couple of locks here seem to lock also while doing things like sending things on channels. This seems prone to deadlocks and is wasteful.

A couple of locks here seem to lock also while doing things like sending
things on channels. This seems prone to deadlocks and is wasteful.
@hsanjuan hsanjuan self-assigned this Jan 10, 2025
@hsanjuan hsanjuan requested a review from a team as a code owner January 10, 2025 20:07
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.48%. Comparing base (6397847) to head (a3e4570).
Report is 1 commits behind head on main.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #787      +/-   ##
==========================================
+ Coverage   60.46%   60.48%   +0.01%     
==========================================
  Files         245      245              
  Lines       31133    31138       +5     
==========================================
+ Hits        18826    18834       +8     
- Misses      10627    10629       +2     
+ Partials     1680     1675       -5     
Files with missing lines Coverage Δ
...tswap/client/internal/messagequeue/messagequeue.go 85.44% <100.00%> (+0.13%) ⬆️

... and 13 files with indirect coverage changes

Copy link
Contributor

@gammazero gammazero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last unlock may be important if this ever blocks:

mq.events <- messageFinishedSending

@gammazero gammazero merged commit 11b5100 into main Jan 15, 2025
16 checks passed
@gammazero gammazero deleted the bslocks branch January 15, 2025 23:04
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.

2 participants