Only remove the items on the seriesForMMap that was already mmaped

Signed-off-by: alanprot <alanprot@gmail.com>
This commit is contained in:
alanprot 2024-08-28 08:38:28 -07:00
parent e20567f054
commit c2a5bf2505

View file

@ -1765,7 +1765,7 @@ func (h *Head) mmapHeadChunks() {
}
h.metrics.mmapChunksTotal.Add(float64(count))
h.seriesForMMapLock.Lock()
h.seriesForMMap = append(h.seriesForMMap[:0], h.seriesForMMap[len(h.seriesForMMap):]...)
h.seriesForMMap = append(h.seriesForMMap[:0], h.seriesForMMap[len(series):]...)
h.seriesForMMapLock.Unlock()
}