Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

fix a startup race by creating the blockstoremanager process on init #465

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

Stebalien
Copy link
Member

fixes #464

@Stebalien Stebalien requested a review from mvdan February 26, 2021 17:42
@@ -26,24 +26,24 @@ func newBlockstoreManager(bs bstore.Blockstore, workerCount int) *blockstoreMana
bs: bs,
workerCount: workerCount,
jobs: make(chan func()),
px: process.WithTeardown(func() error { return nil }),
}
}

func (bsm *blockstoreManager) start(px process.Process) {
Copy link

Choose a reason for hiding this comment

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

we can drop this parameter now?

Copy link
Member Author

Choose a reason for hiding this comment

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

I still need to make sure we shutdown the blockstoreManager when we shutdown the parent service (that's what the AddChild call does).

@Stebalien Stebalien merged commit d1d4afa into master Feb 26, 2021
@Stebalien Stebalien deleted the fix/startup-race branch February 26, 2021 18:22
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
fix a startup race by creating the blockstoremanager process on init

This commit was moved from ipfs/go-bitswap@d1d4afa
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data race in bitswap on start
2 participants