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

DAGService 'recursive' methods #2262

Closed
daviddias opened this issue Jan 29, 2016 · 4 comments
Closed

DAGService 'recursive' methods #2262

daviddias opened this issue Jan 29, 2016 · 4 comments
Labels
kind/support A question or request for support

Comments

@daviddias
Copy link
Member

@whyrusleeping I've a memory of you mentioning that the 'recursive' versions of Add and Remove on the DAGService are deprecated and not used anymore, could you confirm?

https://github.com/ipfs/go-ipfs/blob/master/merkledag/merkledag.go#L71-L89
https://github.com/ipfs/go-ipfs/blob/master/merkledag/merkledag.go#L110-L130

@daviddias daviddias added the kind/support A question or request for support label Jan 29, 2016
@rht
Copy link
Contributor

rht commented Jan 30, 2016

Not @whyrusleeping, I think this should be deprecated, but DAG.AddRecursive is still used in the gateway's delete handler, where in this case there should be a pin lock before doing the adding ([bug]).

DAG.RemoveRecursive is not used, but there has been feature requests of manual removal of a specific unpinned dag without having to gc the entire cached blocks (there is a question of whether this should be allowed, or not, much like in the runtime of gc-ed langs).

@rht
Copy link
Contributor

rht commented Jan 30, 2016

A reason the dag-scale (/ recursive node) operations should not be put into the merkledag spec is that because they have to inter-op with other dag-scale operations (e.g. pinning, gc, or ops in other libs that are using the merkledag).

@whyrusleeping
Copy link
Member

confirmed. AddRecursive should be removed wherever possible. We shouldnt rely on the 'node' pointer in the links for anything other than caching. it should not be used to build a tree

@whyrusleeping
Copy link
Member

these methods have been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

3 participants