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 repair issues #1858

Closed
wants to merge 2 commits into from
Closed

Conversation

yuslepukhin
Copy link
Contributor

Record the first parsed sequence number as the minimum
so we can find the true minimum otherwise everything is larger than zero.
Fix the comparator name comparision.

  so we can find the true minimum otherwise everything is larger than zero.
  Fix the comparator name comparision.
@yuslepukhin
Copy link
Contributor Author

This addresses #1750

@@ -253,7 +253,9 @@ TEST_F(RepairTest, RepairColumnFamilyOptions) {
db_->GetPropertiesOfAllTables(handles_[1], &fname_to_props);
ASSERT_EQ(fname_to_props.size(), 2U);
for (const auto& fname_and_props : fname_to_props) {
ASSERT_EQ(InternalKeyComparator(rev_opts.comparator).Name(),
std::string compName (InternalKeyComparator(rev_opts.comparator).Name());
Copy link
Contributor

Choose a reason for hiding this comment

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

would you mind changing to lower-case underscore-separated variable naming?

@@ -486,6 +486,7 @@ class Repairer {
if (empty) {
empty = false;
t->meta.smallest.DecodeFrom(key);
t->min_sequence = parsed.sequence;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! Looks like this bug has been here a few years. I guess we made the assertions stronger recently and missed it due to repair_test not included in our test suite (will fix that now).

@facebook-github-bot
Copy link
Contributor

@yuslepukhin updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this pull request Feb 11, 2017
Summary:
needed so we can proactively find issues like #1858
Closes #1862

Differential Revision: D4545854

Pulled By: ajkr

fbshipit-source-id: d77fcb7
@yuslepukhin yuslepukhin deleted the fix_repair_logic branch August 7, 2018 22:05
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