Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion storage/hasherstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (h *hasherStore) storeChunk(ctx context.Context, ch Chunk) {
}()
seen, err := h.store.Put(ctx, chunk.ModePutUpload, ch)
h.tag.Inc(chunk.StateStored)
if err != nil && seen[0] {
if err == nil && seen[0] {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the err is not nil? Does that not need any check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, because that error is sent down the channel a few lines later, it is up to the context to handle that, not this function

h.tag.Inc(chunk.StateSeen)
}
select {
Expand Down