Promote DropSeriesGlobal to Index interface

pull/10212/head
Edd Robinson 2018-08-20 17:57:16 +01:00
parent 035b26cadd
commit a67f15fad4
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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 {