prometheus/storage
Goutham Veeramachaneni baf5b0f0fc Fix error where we look into the future. (#2829)
* Fix error where we look into the future.

So currently we are adding values that are in the future for an older
timestamp. For example, if we have [(1, 1), (150, 2)] we will end up
showing [(1, 1), (2,2)].

Further it is not advisable to call .At() after Next() returns false.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Retuen early if done

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Handle Seek() where we reach the end of iterator

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>

* Simplify code

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-13 07:22:27 +02:00
..
tsdb storage: update TSDB 2017-05-22 11:53:08 +02:00
buffer.go Fix error where we look into the future. (#2829) 2017-06-13 07:22:27 +02:00
buffer_test.go Fix error where we look into the future. (#2829) 2017-06-13 07:22:27 +02:00
interface.go storage: update TSDB 2017-05-22 11:53:08 +02:00