prometheus/wal
Goutham Veeramachaneni 10d395259b Avoid creation of 0 sized segments. (#527)
If the corrupt segment is full, then we set donePages on open,
c59ed492b2/wal/wal.go (L235-L243)

Then when we try to repair, we set the segment to be a new segment but
we don't update the donePages: c59ed492b2/wal/wal.go (L334)

We we try to log to this, because donePages is full, we will never log
anything to this segment and create a new one: c59ed492b2/wal/wal.go (L486)

This does not cause issues because we simply concatenate the segments on
read, there by transparently skipping this `0b` segment.
2019-02-25 12:10:27 +02:00
..
live_reader.go LiveReader can get into an infinite loop on corrupt WALs. (#524) 2019-02-19 14:33:57 +00:00
reader.go LiveReader can get into an infinite loop on corrupt WALs. (#524) 2019-02-19 14:33:57 +00:00
reader_test.go LiveReader can get into an infinite loop on corrupt WALs. (#524) 2019-02-19 14:33:57 +00:00
wal.go Avoid creation of 0 sized segments. (#527) 2019-02-25 12:10:27 +02:00
wal_test.go Avoid creation of 0 sized segments. (#527) 2019-02-25 12:10:27 +02:00