-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Improve comments of iterate_upper_bound #8331
Conversation
Summary: ReadOptions.iterate_upper_bound's comment is confusing. Improve it.
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
// not a valid entry. If prefix_extractor is not null, the Seek target | ||
// and iterate_upper_bound need to have the same prefix. | ||
// This is because ordering is not guaranteed outside of prefix domain. | ||
// not a valid entry. If prefix_extractor is not null: |
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 suggest some small language changes:
// not a valid entry. If prefix_extractor is not null:
// 1. If options.auto_prefix_mode = true, iterate_upper_bound will be used
// to infer the prefix to use with the seek key.
// 2. If options.auto_prefix_mode = false, iterate_upper_bound only takes
// effect if it shares the same prefix as the seek key. If
// iterate_upper_bound is outside the prefix of the seek key, then keys returned outside
// the prefix range will be undefined, just as if iterate_upper_bound = null.
// If iterate_upper_bound is not null, SeekToLast() will position the iterator
// at the first key smaller than iterate_upper_bound.
@siying has updated the pull request. You must reimport the pull request before landing. |
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@siying has updated the pull request. You must reimport the pull request before landing. |
@siying has updated the pull request. You must reimport the pull request before landing. |
@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This pull request has been merged in dfa6b40. |
Summary: ReadOptions.iterate_upper_bound's comment is confusing. Improve it.