mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
fix issue with seeking to last sample again
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Some checks failed
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (push) Has been cancelled
CI / Build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
091379dc44
commit
ca530d7f85
2 changed files with 5 additions and 1 deletions
|
|
@ -110,10 +110,14 @@ func testChunk(t *testing.T, c Chunk, supportsST bool) {
|
|||
ts, v = it3.At()
|
||||
res3 = append(res3, triple{st: it3.AtST(), t: ts, v: v})
|
||||
|
||||
lastTs := ts
|
||||
for it3.Next() == ValFloat {
|
||||
ts, v := it3.At()
|
||||
lastTs = ts
|
||||
res3 = append(res3, triple{st: it3.AtST(), t: ts, v: v})
|
||||
}
|
||||
// Seeking to last timestamp should work and it is a no-op.
|
||||
require.Equal(t, ValFloat, it3.Seek(lastTs))
|
||||
require.NoError(t, it3.Err())
|
||||
require.Equal(t, exp[mid:], res3)
|
||||
require.Equal(t, ValNone, it3.Seek(exp[len(exp)-1].t+1))
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ type xorOptSTtIterator struct {
|
|||
}
|
||||
|
||||
func (it *xorOptSTtIterator) Seek(t int64) ValueType {
|
||||
if it.state == eofState {
|
||||
if it.err != nil {
|
||||
return ValNone
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue