Merge pull request #9053 from codesome/histo-race

Fix TSDB race while reading histograms
This commit is contained in:
Björn Rabenstein 2021-07-05 18:25:36 +02:00 committed by GitHub
commit a979d8e1dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2889,7 +2889,7 @@ func (it *memSafeIterator) Next() bool {
return false return false
} }
it.i++ it.i++
if it.Iterator.ChunkEncoding() == chunkenc.EncSHS || it.total-it.i > 4 { if it.total-it.i > 4 {
return it.Iterator.Next() return it.Iterator.Next()
} }
return true return true