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

Fix naming in InternalKey #2868

Closed
wants to merge 2 commits into from
Closed

Conversation

axxufb
Copy link
Contributor

@axxufb axxufb commented Sep 11, 2017

Task: T21624617

  • Switched all instances of SetMinPossibleForUserKey and SetMaxPossibleForUserKey in accordance to InternalKeyComparator's comparison logic

Test Plan:

  • Existing tests

@facebook-github-bot
Copy link
Contributor

@axxufb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@axxufb
Copy link
Contributor Author

axxufb commented Sep 11, 2017

One suggestion is to change the comment on line 412 in db/version_set.cc from "Find the earliest possible internal key for smallest_user_key" to "Find the leftmost possible internal key for smallest_user_key" as the earliest internal key not be the min possible unless it is the only one for that user key.

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing to rocksdb.

db/dbformat.h Outdated
AppendInternalKey(
&rep_, ParsedInternalKey(_user_key, 0, static_cast<ValueType>(0)));
AppendInternalKey(&rep_, ParsedInternalKey(_user_key, kMaxSequenceNumber,
kValueTypeForSeek));
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe run make format to fix the whitespace

Copy link
Contributor

Choose a reason for hiding this comment

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

"make format" replies on internal library, so it can't be used outside the company.

Copy link
Contributor

Choose a reason for hiding this comment

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

She is a bootcamper :)

@@ -411,7 +411,7 @@ bool SomeFileOverlapsRange(
if (smallest_user_key != nullptr) {
// Find the earliest possible internal key for smallest_user_key
Copy link
Contributor

Choose a reason for hiding this comment

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

leftmost sounds good to me.

@facebook-github-bot
Copy link
Contributor

@axxufb updated the pull request - view changes - changes since last import

@facebook-github-bot
Copy link
Contributor

@axxufb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@axxufb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

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

4 participants