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

WIP: batch fetching interfaces on dagservice #4314

Closed
wants to merge 1 commit into from

Conversation

whyrusleeping
Copy link
Member

wip wip wip, definitely looking for feedback on this.

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

@ghost ghost assigned whyrusleeping Oct 17, 2017
@ghost ghost added the status/in-progress In progress label Oct 17, 2017
@@ -334,6 +358,7 @@ type nodePromise struct {
// the first call to Get will block until the Node is received
// from its internal channels, subsequent calls will return the
// cached node.
// TODO: this is a name clash with node.NodeGetter
Copy link
Member

Choose a reason for hiding this comment

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

I'm removing this interface in ipfs/go-ipld-format#8 (introducing a single, public NodePromise type.

return nil, ErrReadOnly
}

func (r *roDagService) GetLinks(ctx context.Context, c *cid.Cid) ([]*node.Link, error) {
Copy link
Member

Choose a reason for hiding this comment

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

This function will also go away wit that PR.

return node.Links(), nil
}

func (r *roDagService) GetOfflineLinkService() LinkService {
Copy link
Member

Choose a reason for hiding this comment

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

As with this one.

func (r *roDagService) GetOfflineLinkService() LinkService {
panic("do not call this method on this object")
}
func (r *roDagService) Batch() *Batch {
Copy link
Member

Choose a reason for hiding this comment

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

And this one.

@@ -28,7 +28,8 @@ func ResolveUnixfsOnce(ctx context.Context, ds dag.DAGService, nd node.Node, nam

switch upb.GetType() {
case ft.THAMTShard:
s, err := hamt.NewHamtFromDag(ds, nd)
panic("foo")
Copy link
Member

Choose a reason for hiding this comment

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

We should probably distinguish between a hampt reader and a hampt writer.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Copy link
Member

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

@Stebalien I see that ipfs/go-ipld-format#8 introduced NodeGetter with GetMany.

Does this make this PR obsolete?

@Kubuxu Kubuxu removed the status/in-progress In progress label Mar 6, 2018
@Stebalien
Copy link
Member

Yes. @whyrusleeping made a follow up PR that uses the new interfaces but we had to revert it as sessions need a bit of work.

@Stebalien Stebalien closed this Mar 6, 2018
@Stebalien Stebalien deleted the feat/fetcher-interfaces branch February 28, 2019 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants