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

Pinning #181

Merged
merged 9 commits into from
Oct 22, 2014
Merged

Pinning #181

merged 9 commits into from
Oct 22, 2014

Conversation

jbenet
Copy link
Member

@jbenet jbenet commented Oct 17, 2014

No description provided.

@jbenet jbenet added the status/in-progress In progress label Oct 17, 2014
}

func BasicFilter() Filter {
// Non crypto hashes, because speed
Copy link
Member Author

Choose a reason for hiding this comment

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

👍 yes. murmur is pretty good. Also, cityhash. Will add links.

@whyrusleeping
Copy link
Member

Cool, I just threw three random ones in there to get things working

@jbenet
Copy link
Member Author

jbenet commented Oct 17, 2014

yeah, i just threw a bunch of links for future ref, not now :)

}

func (d *datastoreBlockSet) prefixKey(k util.Key) ds.Key {
return (util.Key(d.prefix) + k).DsKey()
Copy link
Member Author

Choose a reason for hiding this comment

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

ds.Key is designed with namespacing/prefixing in mind:

type datastoreBlockSet struct {
  ...
  prefix ds.Key
}

func NewDBWrapperSet(d ds.Datastore, prefix string, bset BlockSet) BlockSet {
  return &datastoreBlockSet{
    dstore: d,
    bset:   bset,
    prefix: ds.NewKey(prefix),
  }
}

func (d *datastoreBlockSet) prefixKey(k util.Key) ds.Key {
  return d.prefix.Child(string(k))
}

@jbenet
Copy link
Member Author

jbenet commented Oct 20, 2014

@whyrusleeping done reviewing this. a few notes (mainly cli, and threadsafe), but otherwise LGTM!

@jbenet
Copy link
Member Author

jbenet commented Oct 22, 2014

@whyrusleeping LGTM! Merge in after rebasing.

One last q: right now, does ipfs pin add <hash> flush the pin to disk? (I'm failing to see where if so)

@whyrusleeping
Copy link
Member

hmm... it probably should do that... un moment

@whyrusleeping whyrusleeping merged commit edb5a14 into master Oct 22, 2014
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Oct 22, 2014
@jbenet
Copy link
Member Author

jbenet commented Oct 22, 2014

woooo! pinning!

(this gif is apt in many ways)

@jbenet jbenet deleted the pinning branch October 22, 2014 08:00
@jbenet jbenet restored the pinning branch October 22, 2014 08:30
@jbenet jbenet deleted the pinning branch October 22, 2014 10:04
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
Adds more and better logging (low hanging fruit)
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
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.

2 participants