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

feat: fast-path for PutMany, falling back to Put for single block call #97

Merged
merged 1 commit into from
May 6, 2022

Conversation

MichaelMure
Copy link
Contributor

This avoid the batching overhead.

It's for example called in blockservice, regardless of how many blocks are added.

@BigLep BigLep requested a review from guseggert March 1, 2022 03:06
@BigLep BigLep added this to In Review in Go IPFS Roadmap via automation Mar 1, 2022
@BigLep BigLep added this to the Best Effort Track milestone Mar 3, 2022
blockstore.go Outdated
Comment on lines 221 to 223
for _, b := range blocksList {
jobs <- b
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this deadlock if e.g. all the workers return an error, and there are more workers than elements in blocksList?

@BigLep BigLep added the need/author-input Needs input from the original author label Mar 18, 2022
@MichaelMure
Copy link
Contributor Author

@guseggert I removed my second commit adding the parallelism in PutMany to only keep the fast-path for now. I don't have the bandwidth yet to handle the second part, so let's do the low hanging fruit for now.

@BigLep BigLep removed the need/author-input Needs input from the original author label Apr 22, 2022
@guseggert guseggert merged commit e4da93c into ipfs:master May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Go IPFS Roadmap
  
In Review
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants