-
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
Fix repair issues #1858
Fix repair issues #1858
Conversation
so we can find the true minimum otherwise everything is larger than zero. Fix the comparator name comparision.
This addresses #1750 |
db/repair_test.cc
Outdated
@@ -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()); |
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.
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; |
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.
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).
@yuslepukhin updated the pull request - view changes |
@ajkr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.