mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
close writer after flush
Signed-off-by: jessicagreben <jessicagrebens@gmail.com>
This commit is contained in:
parent
d89a1d999f
commit
896c828bb5
|
@ -164,12 +164,12 @@ func (importer *ruleImporter) importRule(ctx context.Context, ruleExpr, ruleName
|
||||||
default:
|
default:
|
||||||
return errors.New(fmt.Sprintf("rule result is wrong type %s", val.Type().String()))
|
return errors.New(fmt.Sprintf("rule result is wrong type %s", val.Type().String()))
|
||||||
}
|
}
|
||||||
err = tsdb_errors.NewMulti(err, w.Close()).Err()
|
|
||||||
closed = true
|
|
||||||
|
|
||||||
if err := app.flushAndCommit(ctx); err != nil {
|
if err := app.flushAndCommit(ctx); err != nil {
|
||||||
return errors.Wrap(err, "flush and commit")
|
return errors.Wrap(err, "flush and commit")
|
||||||
}
|
}
|
||||||
|
err = tsdb_errors.NewMulti(err, w.Close()).Err()
|
||||||
|
closed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue