-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi_iterator looks broken #178
Comments
Hi Rob, Cheers! |
@rsr-at-mindtwin, I had a look at the iterator implementation. I think the idea was that seek indeed filters the iterators so that only the ones matching the seek will remain in the set of iterators for the next |
thanks. that looks right to me. |
There is a new multi iterator implementation here: https://github.com/lovoo/goka/blob/retention/storage/merge_iterator.go The new implementation should preserve order when iterating over multiple sorted iterators and work as expected when seeking. While the changes in the branch are not really ready for merging otherwise, the iterator itself is complete as far as I remember. I'll have a look on the weekend and new multi iterator merged. |
Didn't quite have the time I expected earlier, but better late than never I guess. #185 should fix this issue. |
@frairon can you check the PR? It lgtm. |
In the code above, the assumption of Next() on the first call is that the set of iterators in m.iters actually are the iterators that had a hit on Seek(), hence the accumulation of iterators into the local []iterator{}.
If that's not the goal, then this code is simply wrong and the iters local shouldn't exist.
The text was updated successfully, but these errors were encountered: