mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
promql: delete redundant return value. (#7721)
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
01d096567b
commit
ac677ed8b3
|
@ -892,16 +892,13 @@ func (h *Head) Truncate(mint int64) (err error) {
|
||||||
|
|
||||||
// initTime initializes a head with the first timestamp. This only needs to be called
|
// initTime initializes a head with the first timestamp. This only needs to be called
|
||||||
// for a completely fresh head with an empty WAL.
|
// for a completely fresh head with an empty WAL.
|
||||||
// Returns true if the initialization took an effect.
|
func (h *Head) initTime(t int64) {
|
||||||
func (h *Head) initTime(t int64) (initialized bool) {
|
|
||||||
if !h.minTime.CAS(math.MaxInt64, t) {
|
if !h.minTime.CAS(math.MaxInt64, t) {
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
// Ensure that max time is initialized to at least the min time we just set.
|
// Ensure that max time is initialized to at least the min time we just set.
|
||||||
// Concurrent appenders may already have set it to a higher value.
|
// Concurrent appenders may already have set it to a higher value.
|
||||||
h.maxTime.CAS(math.MinInt64, t)
|
h.maxTime.CAS(math.MinInt64, t)
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Stats struct {
|
type Stats struct {
|
||||||
|
|
Loading…
Reference in a new issue