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

update to the latest go-merkledag, enable concurrent fetching of the pinset #14

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

MichaelMure
Copy link
Contributor

@@ -216,7 +216,7 @@ func pinSet(ctx context.Context, pinning Pinner, dag ipld.DAGService, onlyRoots
if onlyRoots {
set.Visitor(ctx)(key)
} else {
err := merkledag.Walk(ctx, merkledag.GetLinksWithDAG(dag), key, set.Visitor(ctx))
err := merkledag.Walk(ctx, merkledag.GetLinksWithDAG(dag), key, set.Visitor(ctx), merkledag.Concurrent(), merkledag.WithRoot())
Copy link
Member

Choose a reason for hiding this comment

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

So, I missed that when reviewing the PR. I've reverted the default root behavior in ipfs/go-merkledag#43 to avoid silently changing the API. Released in 0.2.2.

@Stebalien
Copy link
Member

Is this a bottleneck? Providing is usually slow enough that I'm not sure if it's worth it to traverse in parallel.

@MichaelMure
Copy link
Contributor Author

Is this a bottleneck? Providing is usually slow enough that I'm not sure if it's worth it to traverse in parallel.

Not that I'm aware of. I just thought that out of order walking would work just as well, but yeah, no reason to bring the big gun here.

Updated to v0.2.2

@Stebalien Stebalien merged commit 1b0128f into ipfs:master Jul 25, 2019
@Stebalien
Copy link
Member

My concern is mostly that it'll use more memory (32 goroutines for the default parallelism).

Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this pull request Mar 23, 2023
…erkledag

update to the latest go-merkledag, enable concurrent fetching of the pinset

This commit was moved from ipfs/go-ipfs-provider@1b0128f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants