mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-26 05:01:23 -08:00
Fix missing MinTime in histogram chunks
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
parent
2f7060bd5a
commit
27abf09e7f
|
@ -855,13 +855,18 @@ func (p *populateWithDelChunkSeriesIterator) Next() bool {
|
|||
if app, err = newChunk.Appender(); err != nil {
|
||||
break
|
||||
}
|
||||
|
||||
for vt := valueType; vt != chunkenc.ValNone; vt = p.currDelIter.Next() {
|
||||
var h *histogram.Histogram
|
||||
t, h = p.currDelIter.AtHistogram()
|
||||
p.curr.MinTime = t
|
||||
_, _, app, err = app.AppendHistogram(nil, t, h, true)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
for vt := p.currDelIter.Next(); vt != chunkenc.ValNone; vt = p.currDelIter.Next() {
|
||||
if vt != chunkenc.ValHistogram {
|
||||
err = fmt.Errorf("found value type %v in histogram chunk", vt)
|
||||
break
|
||||
}
|
||||
var h *histogram.Histogram
|
||||
t, h = p.currDelIter.AtHistogram()
|
||||
_, _, app, err = app.AppendHistogram(nil, t, h, true)
|
||||
if err != nil {
|
||||
|
@ -890,13 +895,18 @@ func (p *populateWithDelChunkSeriesIterator) Next() bool {
|
|||
if app, err = newChunk.Appender(); err != nil {
|
||||
break
|
||||
}
|
||||
|
||||
for vt := valueType; vt != chunkenc.ValNone; vt = p.currDelIter.Next() {
|
||||
var h *histogram.FloatHistogram
|
||||
t, h = p.currDelIter.AtFloatHistogram()
|
||||
p.curr.MinTime = t
|
||||
_, _, app, err = app.AppendFloatHistogram(nil, t, h, true)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
for vt := p.currDelIter.Next(); vt != chunkenc.ValNone; vt = p.currDelIter.Next() {
|
||||
if vt != chunkenc.ValFloatHistogram {
|
||||
err = fmt.Errorf("found value type %v in histogram chunk", vt)
|
||||
break
|
||||
}
|
||||
var h *histogram.FloatHistogram
|
||||
t, h = p.currDelIter.AtFloatHistogram()
|
||||
_, _, app, err = app.AppendFloatHistogram(nil, t, h, true)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue