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

Avoid resetting cursor on no-op seek #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frankmcsherry
Copy link
Member

The implementation of seek had the defective property that when the seek was a no-op, for example when one re-issued a seek to the same key multiple times in sequence, the child cursor (over associated values, say) would be reset each time. I judge the correct implementation of seek to not do this, so as to present a continually advancing cursor. One can always rewind a cursor's values if that is what you want. (of course, one could always test if you are at the correct key and not seek as well).

@frankmcsherry
Copy link
Member Author

Counterpoint: it is perhaps antisocial for a seek call not to result in a specifically positioned cursor, but rather one that may need to be checked to see if it has already been slightly advanced (logic that wants to enumerate values for keys with repeats may need to be smarter now, or risk having errors).

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.

1 participant