Skip to content
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

storage: merge iterator implementation #185

Merged
merged 1 commit into from
May 27, 2019
Merged

storage: merge iterator implementation #185

merged 1 commit into from
May 27, 2019

Conversation

SamiHiltunen
Copy link
Contributor

Addition of the Err() method on the Iterator interface might break some code implementing custom iterators. Also, existing code should be updated to check the possible error after iteration by calling the Err(). Previous implementation didn't surface the error, causing some possible errors to go unseen.

  • Adds a new merge iterator implementation to the storage package.
    Compared to the old multi iterator, the new implementation
    iterates in sorted order over the subiterators and exhibits
    correct behavior when seeking over subiterators.

  • Adds Err() method on Iterator interface. Err() should be called
    after finishing iteration to check for possible errors.

Fixes #178

* Adds a new merge iterator implementation to the storage package.
  Compared to the old multi iterator, the new implementation
  iterates in sorted order over the subiterators and exhibits
  correct behavior when seeking over subiterators.

* Adds Err() method on Iterator interface. Err() should be called
  after finishing iteration to check for possible errors.
Copy link
Collaborator

@db7 db7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SamiHiltunen thanks for taking the time. LGTM.

@frairon frairon requested review from kavinsk1 and frairon May 7, 2019 07:21
@frairon frairon merged commit 6636bb3 into lovoo:master May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multi_iterator looks broken
3 participants