Merge the 2.13 release branch to master (#6117)

This commit is contained in:
Krasi Georgiev 2019-10-09 17:41:46 +02:00 committed by GitHub
parent 6b22997791
commit 81d284f806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 18 deletions

View file

@ -1,6 +1,8 @@
## 2.13.0-rc.0 / 2019-09-25 ## 2.13.0 / 2019-10-04
* [SECURITY/BUGFIX] UI: Fix a Stored DOM XSS vulnerability with query history [CVE-2019-10215](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10215). #6098
* [CHANGE] Metrics: renamed prometheus_sd_configs_failed_total to prometheus_sd_failed_configs and changed to Gauge #5254 * [CHANGE] Metrics: renamed prometheus_sd_configs_failed_total to prometheus_sd_failed_configs and changed to Gauge #5254
* [ENHANCEMENT] Include the tsdb tool in builds. #6089
* [ENHANCEMENT] Service discovery: add new node address types for kubernetes. #5902 * [ENHANCEMENT] Service discovery: add new node address types for kubernetes. #5902
* [ENHANCEMENT] UI: show warnings if query have returned some warnings. #5964 * [ENHANCEMENT] UI: show warnings if query have returned some warnings. #5964
* [ENHANCEMENT] Remote write: reduce memory usage of the series cache. #5849 * [ENHANCEMENT] Remote write: reduce memory usage of the series cache. #5849

View file

@ -1 +1 @@
2.13.0-rc.0 2.13.0

View file

@ -21,7 +21,10 @@ import (
// ewmaRate tracks an exponentially weighted moving average of a per-second rate. // ewmaRate tracks an exponentially weighted moving average of a per-second rate.
type ewmaRate struct { type ewmaRate struct {
// Keep all 64bit atomically accessed variables at the top of this struct.
// See https://golang.org/pkg/sync/atomic/#pkg-note-BUG for more info.
newEvents int64 newEvents int64
alpha float64 alpha float64
interval time.Duration interval time.Duration
lastRate float64 lastRate float64

View file

@ -40,8 +40,11 @@ type pool struct {
} }
type entry struct { type entry struct {
s string // Keep all 64bit atomically accessed variables at the top of this struct.
// See https://golang.org/pkg/sync/atomic/#pkg-note-BUG for more info.
refs int64 refs int64
s string
} }
func newPool() *pool { func newPool() *pool {

View file

@ -216,7 +216,7 @@ func newDBMetrics(db *DB, r prometheus.Registerer) *dbMetrics {
db.mtx.RLock() db.mtx.RLock()
defer db.mtx.RUnlock() defer db.mtx.RUnlock()
if len(db.blocks) == 0 { if len(db.blocks) == 0 {
return float64(db.head.minTime) return float64(db.head.MinTime())
} }
return float64(db.blocks[0].meta.MinTime) return float64(db.blocks[0].meta.MinTime)
}) })

View file

@ -61,18 +61,20 @@ var (
// Head handles reads and writes of time series data within a time window. // Head handles reads and writes of time series data within a time window.
type Head struct { type Head struct {
// Keep all 64bit atomically accessed variables at the top of this struct.
// See https://golang.org/pkg/sync/atomic/#pkg-note-BUG for more info.
chunkRange int64 chunkRange int64
numSeries uint64
minTime, maxTime int64 // Current min and max of the samples included in the head.
minValidTime int64 // Mint allowed to be added to the head. It shouldn't be lower than the maxt of the last persisted block.
lastSeriesID uint64
metrics *headMetrics metrics *headMetrics
wal *wal.WAL wal *wal.WAL
logger log.Logger logger log.Logger
appendPool sync.Pool appendPool sync.Pool
seriesPool sync.Pool seriesPool sync.Pool
bytesPool sync.Pool bytesPool sync.Pool
numSeries uint64
minTime, maxTime int64 // Current min and max of the samples included in the head.
minValidTime int64 // Mint allowed to be added to the head. It shouldn't be lower than the maxt of the last persisted block.
lastSeriesID uint64
// All series addressable by their ID or hash. // All series addressable by their ID or hash.
series *stripeSeries series *stripeSeries

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long