fix bug in http_batch_store storing of hints (#3013)

This commit is contained in:
Rafael Weinstein
2017-01-04 07:09:45 -08:00
committed by GitHub
parent 129b07818a
commit 8144738a06

View File

@@ -339,7 +339,7 @@ func (bhcs *httpBatchStore) SchedulePut(c chunks.Chunk, refHeight uint64, hints
defer bhcs.cacheMu.RUnlock()
bhcs.unwrittenPuts.Insert(c)
for hint := range hints {
hints[hint] = struct{}{}
bhcs.hints[hint] = struct{}{}
}
}
@@ -347,7 +347,7 @@ func (bhcs *httpBatchStore) AddHints(hints types.Hints) {
bhcs.cacheMu.RLock()
defer bhcs.cacheMu.RUnlock()
for hint := range hints {
hints[hint] = struct{}{}
bhcs.hints[hint] = struct{}{}
}
}