mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-26 21:22:33 -08:00
Fix chunk corruption compaction bug.
This fixes part 1) of https://github.com/prometheus/prometheus/issues/367 (the storing of samples with the wrong fingerprint into a compacted chunk, thus corrupting it). Change-Id: I4c36d0d2e508e37a0aba90b8ca2ecc78ee03e3f1
This commit is contained in:
parent
a50ee8df30
commit
a1a97ed064
|
@ -135,6 +135,9 @@ func (p *CompactionProcessor) Apply(sampleIterator leveldb.Iterator, samplesPers
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sampleKey.Load(sampleKeyDto)
|
sampleKey.Load(sampleKeyDto)
|
||||||
|
if !sampleKey.Fingerprint.Equal(fingerprint) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
unactedSamples, err = extractSampleValues(sampleIterator)
|
unactedSamples, err = extractSampleValues(sampleIterator)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue