File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,8 @@ func (a *iteratorAdapter) Seek(t int64) bool {
104104 } else if t <= a .underlying .MaxCurrentChunkTime () {
105105 // In this case, some timestamp inside the current underlying chunk can fulfill the seek.
106106 // In this case we will call next until we find the sample as it will be faster than calling seek directly.
107- for a .underlying .Next (promchunk .BatchSize ) {
108- a .curr = a .underlying .Batch ()
109- if t <= a .curr .Timestamps [a .curr .Length - 1 ] {
110- //In this case, some timestamp between current sample and end of batch can fulfill
111- //the seek. Let's find it.
112- for a .curr .Index < a .curr .Length && t > a .curr .Timestamps [a .curr .Index ] {
113- a .curr .Index ++
114- }
107+ for a .Next () {
108+ if t <= a .curr .Timestamps [a .curr .Index ] {
115109 return true
116110 }
117111 }
You can’t perform that action at this time.
0 commit comments