Fix bug around index purging.

Change-Id: I8cea00e03f72bbeead2cbd2d26b34d986059ced0
This commit is contained in:
Julius Volz 2014-09-18 17:14:37 +02:00 committed by Bjoern Rabenstein
parent 630b5a087a
commit f0d5d4bda3

View file

@ -346,7 +346,7 @@ func (s *memorySeriesStorage) purgeSeries(fp clientmodel.Fingerprint, beforeTime
// Purge chunks from memory accordingly.
if series, ok := s.fingerprintToSeries[fp]; ok {
if series.purgeOlderThan(beforeTime) {
if series.purgeOlderThan(beforeTime) && allDropped {
delete(s.fingerprintToSeries, fp)
if err := s.persistence.UnindexMetric(series.metric, fp); err != nil {
glog.Errorf("Error unindexing metric %v: %v", series.metric, err)