prometheus/prometheus

[Remote Write] WAL watching best-effort start from a checkpoint instead of time.Now

Open

#8,809 opened on May 10, 2021

View on GitHub
 (19 comments) (4 reactions) (0 assignees)Go (64,042 stars) (10,408 forks)batch import
component/remote storagehelp wantednot-as-easy-as-it-looks

Description

Right now remote write starts sending samples with a timestamp after time.Now() when Prometheus started (more or less). On restart or config reload if remote write wasn't able to flush it's pending samples cleanly or was behind for some reason there will be samples missing in the remote storage. If remote write always starts from a checkpoint in some kind of checkpoint file for it's queue name/config hash we can avoid that situation.

see: https://github.com/prometheus/prometheus/pull/7710

Contributor guide