fix type assertion err

pull/10616/head
zhulongcheng 2018-10-27 01:57:18 +08:00
parent 268832ee64
commit 1dd0d33b1e
1 changed files with 8 additions and 9 deletions

View File

@ -1189,17 +1189,16 @@ func (e *Engine) DeleteSeriesRangeWithPredicate(itr tsdb.SeriesIterator, predica
// Ensure that the index does not compact away the measurement or series we're
// going to delete before we're done with them.
if tsiIndex, ok := e.index.(*tsi1.Index); ok {
tsiIndex.DisableCompactions()
defer tsiIndex.EnableCompactions()
tsiIndex.Wait()
e.index.DisableCompactions()
defer e.index.EnableCompactions()
e.index.Wait()
fs, err := tsiIndex.RetainFileSet()
if err != nil {
return err
}
defer fs.Release()
fs, err := e.index.RetainFileSet()
if err != nil {
return err
}
defer fs.Release()
var (
sz int