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

Improve FullFilterBitsReader::HashMayMatch's doc #4202

Closed
wants to merge 1 commit into from

Conversation

yaojingguo
Copy link
Contributor

@yaojingguo yaojingguo commented Jul 31, 2018

HashMayMatch is related to AddKey() instead of CreateFilter().
Also applies some minor Fixes #4191 #4200 #3910

@maysamyabandeh
Copy link
Contributor

maysamyabandeh commented Aug 1, 2018

It should be change to this:

   // "filter" contains the data appended by a preceding call to
-  // CreateFilterFromHash() on this class.  This method must return true if
-  // the key was in the list of keys passed to CreateFilter().
-  // This method may return true or false if the key was not on the
-  // list, but it should aim to return false with a high probability.
+  // FilterBitsBuilder::Finish. This method must return true if the key was
+  // passed to FilterBitsBuilder::AddKey. This method may return true or false
+  // if the key was not on the list, but it should aim to return false with a
+  // high probability.
   //

Do you have time to apply this change? And also piggyback the minor fixes mentioned in these PRs?

@yaojingguo
Copy link
Contributor Author

@maysamyabandeh A new commit which includes the suggested PRs is submitted. Please take a look.

util/bloom.cc Outdated
// FilterBitsBuilder::Finish. This method must return true if the key was
// passed to FilterBitsBuilder::AddKey. This method may return true or false
// if the key was not on the list, but it should aim to return false with a
// high probability.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the trailing spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@maysamyabandeh maysamyabandeh changed the title doc: improve HashMayMatch's comment Improve FullFilterBitsReader::HashMayMatch's doc Aug 3, 2018
- Remove the unused variable write_context.
- Fix two typos.
- Improve HashMayMatch function's comment.
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

maysamyabandeh is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

rcane pushed a commit to rcane/rocksdb that referenced this pull request Sep 13, 2018
Summary:
HashMayMatch is related to AddKey() instead of CreateFilter().
Also applies some minor Fixes facebook#4191 facebook#4200 facebook#3910
Pull Request resolved: facebook#4202

Differential Revision: D9180945

Pulled By: maysamyabandeh

fbshipit-source-id: 6f07b81c5bb9bda5c0273475b486ba8a030471e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants