Merge pull request #8610 from roidelapluie/release2252

Release 2.25.2
This commit is contained in:
Julien Pivotto 2021-03-16 19:03:38 +01:00 committed by GitHub
commit bda05a23ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
## 2.25.2 / 2021-03-16
* [BUGFIX] Fix the ingestion of scrapes when the wall clock changes, e.g. on suspend. #8601
## 2.25.1 / 2021-03-14 ## 2.25.1 / 2021-03-14
* [BUGFIX] Fix a crash in `promtool` when a subquery with default resolution is used. #8569 * [BUGFIX] Fix a crash in `promtool` when a subquery with default resolution is used. #8569

View File

@ -1 +1 @@
2.25.1 2.25.2

View File

@ -1005,7 +1005,7 @@ func (sl *scrapeLoop) run(interval, timeout time.Duration, errc chan<- error) {
var last time.Time var last time.Time
alignedScrapeTime := time.Now() alignedScrapeTime := time.Now().Round(0)
ticker := time.NewTicker(interval) ticker := time.NewTicker(interval)
defer ticker.Stop() defer ticker.Stop()
@ -1023,7 +1023,9 @@ mainLoop:
// Temporary workaround for a jitter in go timers that causes disk space // Temporary workaround for a jitter in go timers that causes disk space
// increase in TSDB. // increase in TSDB.
// See https://github.com/prometheus/prometheus/issues/7846 // See https://github.com/prometheus/prometheus/issues/7846
scrapeTime := time.Now() // Calling Round ensures the time used is the wall clock, as otherwise .Sub
// and .Add on time.Time behave differently (see time package docs).
scrapeTime := time.Now().Round(0)
if AlignScrapeTimestamps && interval > 100*scrapeTimestampTolerance { if AlignScrapeTimestamps && interval > 100*scrapeTimestampTolerance {
// For some reason, a tick might have been skipped, in which case we // For some reason, a tick might have been skipped, in which case we
// would call alignedScrapeTime.Add(interval) multiple times. // would call alignedScrapeTime.Add(interval) multiple times.