prometheus/storage
beorn7 f6f4fd6556 tsdb: Do a full rollback upon commit error
I think the previous behavior is problematic as it will leave
`memSeries` around that still have `pendingCommit` set to `true`.

The only case where this can happen in this code path is a failure to
write to the WAL, in which case we are probably in trouble anyway. I
believe, however, we should still try to do the right thing and do the
full rollback. This will implicitly try to write to the WAL again, but
this time without samples, which may even succeed. (But we propagate
the previous error in any case.)

This also adds `a.head.putSeriesBuffer(a.sampleSeries)` to Rollback,
which was previously missing.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-03-10 14:54:41 +01:00
..
fanout Addressed Brian's comments, moved metrics to main.go 2020-02-17 18:03:57 +00:00
remote Rw testability improvements (#6537) 2020-02-25 11:10:57 -08:00
buffer.go Addressed comments. 2020-02-17 18:03:57 +00:00
buffer_test.go Unify Iterator interfaces. All point to storage now. 2020-02-17 18:03:54 +00:00
fanout.go Unify Iterator interfaces. All point to storage now. 2020-02-17 18:03:54 +00:00
fanout_test.go Unify Iterator interfaces. All point to storage now. 2020-02-17 18:03:54 +00:00
interface.go tsdb: Do a full rollback upon commit error 2020-03-10 14:54:41 +01:00
noop.go Addressed comments. 2020-02-17 18:03:57 +00:00