-
Notifications
You must be signed in to change notification settings - Fork 36
fix(arc): striped locking on last byte of CID #67
Conversation
cedc5bc
to
a6bac41
Compare
11498f4
to
80e1a84
Compare
a6bac41
to
2815f62
Compare
878e3f9
to
d94af12
Compare
d94af12
to
66266c5
Compare
83cb480
to
72ade3e
Compare
9d57a70
to
b34f205
Compare
arc_cache.go
Outdated
var good []blocks.Block | ||
for _, block := range bs { | ||
// call put on block if result is inconclusive or we are sure that | ||
// the block isn't in storage | ||
if has, _, ok := b.queryCache(block.Cid()); !ok || (ok && !has) { | ||
if !block.Cid().Defined() { | ||
log.Error("undefined cid in arc cache") | ||
continue |
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.
unsure if we want to continue or bail in the event an undefined CID is in bs
, thoughts?
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.
On put, bail. This is definitely an invalid block.
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.
removed this case since it should never (right?) be the case that the CID of a blocks.Block is undefined.
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.
Yeah, that should be impossible.
b305189
to
7475315
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.
Two small things but otherwise LGTM.
fe0c977
to
8d1f7bf
Compare
Thanks! |
…che-stripe fix(arc): striped locking on last byte of CID This commit was moved from ipfs/go-ipfs-blockstore@d90561b
No description provided.