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 {