Browse Source

Add ability to set minValidTime in TSDB (#8415)

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Review feedback

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
pull/8519/head
Goutham Veeramachaneni 4 years ago committed by GitHub
parent
commit
404d85f7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      tsdb/head.go

5
tsdb/head.go

@ -752,6 +752,11 @@ func (h *Head) Init(minValidTime int64) error {
return nil
}
// SetMinValidTime sets the minimum timestamp the head can ingest.
func (h *Head) SetMinValidTime(minValidTime int64) {
h.minValidTime.Store(minValidTime)
}
func (h *Head) loadMmappedChunks() (map[uint64][]*mmappedChunk, error) {
mmappedChunks := map[uint64][]*mmappedChunk{}
if err := h.chunkDiskMapper.IterateAllChunks(func(seriesRef, chunkRef uint64, mint, maxt int64, numSamples uint16) error {

Loading…
Cancel
Save