-
-
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
Pinning #181
Pinning #181
Conversation
} | ||
|
||
func BasicFilter() Filter { | ||
// Non crypto hashes, because speed |
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.
👍 yes. murmur is pretty good. Also, cityhash. Will add links.
Links on hashing for bloom filters: |
Cool, I just threw three random ones in there to get things working |
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() |
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.
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))
}
@whyrusleeping done reviewing this. a few notes (mainly cli, and threadsafe), but otherwise LGTM! |
@whyrusleeping LGTM! Merge in after rebasing. One last q: right now, does |
5dee261
to
1337790
Compare
hmm... it probably should do that... un moment |
e60bc60
to
edb5a14
Compare
Adds more and better logging (low hanging fruit)
No description provided.