mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
Minor tiered storage fixups.
This commit is contained in:
parent
3621148e7f
commit
69a24427b7
|
@ -415,10 +415,7 @@ func (t *tieredStorage) renderView(viewJob viewJob) (err error) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
firstTime := indexable.DecodeTime(foundKey.Timestamp)
|
||||||
firstTime = indexable.DecodeTime(foundKey.Timestamp)
|
|
||||||
lastTime = time.Unix(*foundKey.LastTimestamp, 0)
|
|
||||||
)
|
|
||||||
|
|
||||||
if operation.StartsAt().Before(firstTime) {
|
if operation.StartsAt().Before(firstTime) {
|
||||||
// Imagine the following supertime blocks with last time ranges:
|
// Imagine the following supertime blocks with last time ranges:
|
||||||
|
@ -430,7 +427,8 @@ func (t *tieredStorage) renderView(viewJob viewJob) (err error) {
|
||||||
// block with supertime 1010, then need to rewind by one block by
|
// block with supertime 1010, then need to rewind by one block by
|
||||||
// virtue of LevelDB iterator seek behavior.
|
// virtue of LevelDB iterator seek behavior.
|
||||||
fmt.Printf("operation %s may occur in next entity; rewinding...\n", operation)
|
fmt.Printf("operation %s may occur in next entity; rewinding...\n", operation)
|
||||||
iterator.Previous()
|
// XXXXXX
|
||||||
|
//iterator.Previous()
|
||||||
panic("oops")
|
panic("oops")
|
||||||
}
|
}
|
||||||
// fmt.Printf("operation %s occurs inside of %s...\n", operation, foundKey)
|
// fmt.Printf("operation %s occurs inside of %s...\n", operation, foundKey)
|
||||||
|
@ -455,7 +453,7 @@ func (t *tieredStorage) renderView(viewJob viewJob) (err error) {
|
||||||
foundValue.Value = foundValue.Value[index:elementCount]
|
foundValue.Value = foundValue.Value[index:elementCount]
|
||||||
}
|
}
|
||||||
switch operation.(type) {
|
switch operation.(type) {
|
||||||
case getValuesAtTimeOp:
|
case *getValuesAtTimeOp:
|
||||||
if len(foundValue.Value) > 0 {
|
if len(foundValue.Value) > 0 {
|
||||||
view.appendSample(scanJob.fingerprint, time.Unix(*foundValue.Value[0].Timestamp, 0), model.SampleValue(*foundValue.Value[0].Value))
|
view.appendSample(scanJob.fingerprint, time.Unix(*foundValue.Value[0].Timestamp, 0), model.SampleValue(*foundValue.Value[0].Value))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue