From a67f15fad4b02a7a65ca9b73cf3c623f015deac4 Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Mon, 20 Aug 2018 17:57:16 +0100 Subject: [PATCH] Promote DropSeriesGlobal to Index interface --- tsdb/index.go | 3 +++ tsdb/index/tsi1/index.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tsdb/index.go b/tsdb/index.go index d85d15c289..1acfbbf8a3 100644 --- a/tsdb/index.go +++ b/tsdb/index.go @@ -35,6 +35,9 @@ type Index interface { DropSeries(seriesID uint64, key []byte, cascade bool) error DropMeasurementIfSeriesNotExist(name []byte) error + // Used to clean up series in inmem index that were dropped with a shard. + DropSeriesGlobal(key []byte) error + MeasurementsSketches() (estimator.Sketch, estimator.Sketch, error) SeriesN() int64 SeriesSketches() (estimator.Sketch, estimator.Sketch, error) diff --git a/tsdb/index/tsi1/index.go b/tsdb/index/tsi1/index.go index 64a290a046..6459cb1753 100644 --- a/tsdb/index/tsi1/index.go +++ b/tsdb/index/tsi1/index.go @@ -643,6 +643,9 @@ func (i *Index) DropSeries(seriesID uint64, key []byte, cascade bool) error { return nil } +// DropSeriesGlobal is a no-op on the tsi1 index. +func (i *Index) DropSeriesGlobal(key []byte) error { return nil } + // DropMeasurementIfSeriesNotExist drops a measurement only if there are no more // series for the measurment. func (i *Index) DropMeasurementIfSeriesNotExist(name []byte) error {