-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Reset DBIter::saved_key_ with proper user key anywhere before pass to DBIter::FindNextUserEntry #1962
Conversation
@lightmark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
db/db_iter.cc
Outdated
@@ -961,6 +960,7 @@ void DBIter::Seek(const Slice& target) { | |||
} | |||
direction_ = kForward; | |||
ClearSavedValue(); | |||
saved_key_.Reserve(saved_key_.Size() - 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add more comments explaining when we are using InternalKey and when we are using UserKey and why is that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I will make a new PR to refactor IterKey soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a simple comment saying that this line purpose is to convert the internal key to a user key because FindNextUserEntry needs a UserKey to be stored in saved_key_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Added
@lightmark updated the pull request - view changes - changes since last import |
@lightmark updated the pull request - view changes - changes since last import |
@lightmark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@lightmark updated the pull request - view changes - changes since last import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I still don't see the comment :D
@lightmark updated the pull request - view changes - changes since last import |
@lightmark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
fix db_iter bug introduced by facebook#1413