| 1299 | } |
| 1300 | |
| 1301 | func (it *DeletedIterator) Seek(t int64) chunkenc.ValueType { |
| 1302 | if it.Iter.Err() != nil { |
| 1303 | return chunkenc.ValNone |
| 1304 | } |
| 1305 | valueType := it.Iter.Seek(t) |
| 1306 | if valueType == chunkenc.ValNone { |
| 1307 | return chunkenc.ValNone |
| 1308 | } |
| 1309 | |
| 1310 | // Now double check if the entry falls into a deleted interval. |
| 1311 | ts := it.AtT() |
| 1312 | for _, itv := range it.Intervals { |
| 1313 | if ts < itv.Mint { |
| 1314 | return valueType |
| 1315 | } |
| 1316 | |
| 1317 | if ts > itv.Maxt { |
| 1318 | it.Intervals = it.Intervals[1:] |
| 1319 | continue |
| 1320 | } |
| 1321 | |
| 1322 | // We're in the middle of an interval, we can now call Next(). |
| 1323 | return it.Next() |
| 1324 | } |
| 1325 | |
| 1326 | // The timestamp is greater than all the deleted intervals. |
| 1327 | return valueType |
| 1328 | } |
| 1329 | |
| 1330 | func (it *DeletedIterator) Next() chunkenc.ValueType { |
| 1331 | Outer: |