prometheus/rules
Björn Rabenstein d80b0810c1
Move crucial actions to defer (#6918)
With defer having less of a performance penalty, there is no reason
not to do those crucial operations via defer.

Context: With isolation in place, if we forget to Commit/Rollback, the
low watermark will get stuck forever.

The current code should not have any bugs, but moving to defer helps
to avoid future bugs.

This is also moving the `closeAppend` in the `Commit` implementation
itself to defer. If logging to the WAL fails, we would have missed the
`closeAppend`.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-03-13 20:54:47 +01:00
..
fixtures rules: Make deleted rule series as stale after a reload (#6745) 2020-02-12 16:22:18 +01:00
alerting.go Fix build errors in rest of prometheus 2020-02-17 16:09:23 +01:00
alerting_test.go Comment fixes 2020-02-17 16:09:23 +01:00
manager.go Move crucial actions to defer (#6918) 2020-03-13 20:54:47 +01:00
manager_test.go Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00
recording.go Fix build errors in rest of prometheus 2020-02-17 16:09:23 +01:00
recording_test.go Comment fixes 2020-02-17 16:09:23 +01:00