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

fix: mpool: avoid deadlock on unsubscribe #8635

Merged
merged 2 commits into from
May 10, 2022
Merged

fix: mpool: avoid deadlock on unsubscribe #8635

merged 2 commits into from
May 10, 2022

Conversation

arajasek
Copy link
Contributor

Related Issues

Fixes #7803

Proposed Changes

When unsubscribing all topics, pubsub will drain the subscription channel to avoid deadlocks. See
whyrusleeping/pubsub#1.

Also starts using https://github.com/filecoin-project/pubsub instead of https://github.com/whyrusleeping/pubsub

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

arajasek and others added 2 commits May 10, 2022 16:51
When unsubscribing _all_ topics, pubsub will drain the subscription
channel to avoid deadlocks. See
whyrusleeping/pubsub#1.

fixes #7803
@arajasek arajasek requested a review from a team as a code owner May 10, 2022 20:56
@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #8635 (9da58c5) into master (f22a0f9) will decrease coverage by 0.71%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8635      +/-   ##
==========================================
- Coverage   40.81%   40.10%   -0.72%     
==========================================
  Files         686      686              
  Lines       75750    75750              
==========================================
- Hits        30920    30380     -540     
- Misses      39495    40092     +597     
+ Partials     5335     5278      -57     
Impacted Files Coverage Δ
chain/store/store.go 64.83% <ø> (-0.67%) ⬇️
chain/messagepool/messagepool.go 63.65% <100.00%> (ø)
chain/sync.go 70.86% <100.00%> (ø)
extern/sector-storage/manager_post.go 5.97% <0.00%> (-76.12%) ⬇️
extern/sector-storage/sched_post.go 16.80% <0.00%> (-64.80%) ⬇️
cmd/lotus-worker/sealworker/rpc.go 0.00% <0.00%> (-36.00%) ⬇️
node/impl/remoteworker.go 0.00% <0.00%> (-33.34%) ⬇️
itests/kit/ensemble_opts_nv.go 76.00% <0.00%> (-24.00%) ⬇️
api/client/client.go 38.98% <0.00%> (-18.65%) ⬇️
itests/kit/node_opts.go 58.90% <0.00%> (-17.81%) ⬇️
... and 41 more

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