prometheus/tsdb/agent
Robert Fratto a344a91f67 tsdb/agent: ensure that new series get written to WAL on rollback #12592
If a new series is introduced in a storage.Appender instance, that
series should be written to the WAL once the storage.Appender is closed,
even on Rollback.

Previously, new series would only be written to the WAL when calling
Commit. However, because the series is stored in memory regardless,
subsequent calls to Commit may write samples to the WAL which reference
a series ID which that was never written.

Related to #11589. It's likely that this fix also resolves this issue,
but we need more testing from users to see if the problem persists after
this fix; there may be more cases where samples get written to the WAL
in Prometheus Agent mode without the corresponding series record.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2024-04-30 16:33:15 +02:00
..
db.go tsdb/agent: ensure that new series get written to WAL on rollback #12592 2024-04-30 16:33:15 +02:00
db_test.go tsdb/agent: ensure that new series get written to WAL on rollback #12592 2024-04-30 16:33:15 +02:00
series.go tsdb/agent: Ignore duplicate exemplars (#10595) 2022-04-18 11:41:04 -04:00
series_test.go tsdb/agent: Fix deadlock from simultaneous GC and write (#10166) 2022-01-19 20:23:06 +05:30