-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one.
unixfs/io/resolve.go
Outdated
@@ -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") |
There was a problem hiding this comment.
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.
d3ac4b9
to
979280d
Compare
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
979280d
to
db5b831
Compare
There was a problem hiding this 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?
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. |
wip wip wip, definitely looking for feedback on this.
License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com