code: func (h *Head) Delete(mint, maxt int64, ms ...labels.Matcher) error {
  	// Do not delete anything beyond the currently valid range.
  	mint, maxt = clampInterval(mint, maxt, h.MinTime(), h.MaxTime())
  
  	ir := h.indexRange(mint, maxt)
  
  	p, err := PostingsForMatchers(ir, ms...)
  	if err != nil {
  		return errors.Wrap(err, "select series")
  	}
  
  	var stones []Stone
  	dirty := false
  	for p.Next() {
  		series := h.series.getByID(p.At())
  
  		t0, t1 := series.minTime(), series.maxTime()
  		if t0 == math.MinInt64 || t1 == math.MinInt64 {
  			continue
  		}
  		// Delete only until the current values and not beyond.
  		t0, t1 = clampInterval(mint, maxt, t0, t1)
  		if h.wal != nil {
  			stones = append(stones, Stone{p.At(), Intervals{{t0, t1}}})
  		}
  		if err := h.chunkRewrite(p.At(), Intervals{{t0, t1}}); err != nil {
  			return errors.Wrap(err, "delete samples")
  		}
  		dirty = true
  	}
  	if p.Err() != nil {
  		return p.Err()
  	}
  	var enc RecordEncoder
  	if h.wal != nil {
  		// Although we don't store the stones in the head
  		// we need to write them to the WAL to mark these as deleted
  		// after a restart while loading the WAL.
  		if err := h.wal.Log(enc.Tombstones(stones, nil)); err != nil {
  			return err
  		}
  	}
  	if dirty {
  		h.gc()
  	}
  
  	return nil
  }
docs: // Delete all samples in the range of [mint, maxt] for series that satisfy the given
  // label matchers.