Skip to content

Commit

Permalink
Fix chunk corruption compaction bug.
Browse files Browse the repository at this point in the history
This fixes part 1) of #367 (the
storing of samples with the wrong fingerprint into a compacted chunk, thus
corrupting it).

Change-Id: I4c36d0d2e508e37a0aba90b8ca2ecc78ee03e3f1
  • Loading branch information
juliusv committed Oct 21, 2013
1 parent a50ee8d commit a1a97ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/metric/processor.go
Expand Up @@ -135,6 +135,9 @@ func (p *CompactionProcessor) Apply(sampleIterator leveldb.Iterator, samplesPers
return
}
sampleKey.Load(sampleKeyDto)
if !sampleKey.Fingerprint.Equal(fingerprint) {
break
}

unactedSamples, err = extractSampleValues(sampleIterator)
if err != nil {
Expand Down

0 comments on commit a1a97ed

Please sign in to comment.