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

osd: be more precise about our asserts and cases when rebuilding miss… #17000

Merged
merged 2 commits into from Aug 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mon/Monitor.cc
Expand Up @@ -3602,7 +3602,7 @@ void Monitor::handle_command(MonOpRequestRef op)

mdsmon()->count_metadata("ceph_version", &mds);
f->open_object_section("mds");
for (auto& p : mon) {
for (auto& p : mds) {
f->dump_int(p.first.c_str(), p.second);
overall[p.first] += p.second;
}
Expand Down
9 changes: 5 additions & 4 deletions src/osd/PGLog.h
Expand Up @@ -1284,6 +1284,7 @@ struct PGLog : DoutPrefixProvider {
eversion_t on_disk_rollback_info_trimmed_to = eversion_t();
ObjectMap::ObjectMapIterator p = store->get_omap_iterator(log_coll, log_oid);
map<eversion_t, hobject_t> divergent_priors;
bool must_rebuild = force_rebuild_missing;
missing.may_include_deletes = false;
list<pg_log_entry_t> entries;
list<pg_log_dup_t> dups;
Expand All @@ -1298,7 +1299,7 @@ struct PGLog : DoutPrefixProvider {
::decode(divergent_priors, bp);
ldpp_dout(dpp, 20) << "read_log_and_missing " << divergent_priors.size()
<< " divergent_priors" << dendl;
assert(force_rebuild_missing);
must_rebuild = true;
debug_verify_stored_missing = false;
} else if (p->key() == "can_rollback_to") {
::decode(on_disk_can_rollback_to, bp);
Expand Down Expand Up @@ -1345,7 +1346,7 @@ struct PGLog : DoutPrefixProvider {
std::move(entries),
std::move(dups));

if (force_rebuild_missing || debug_verify_stored_missing) {
if (must_rebuild || debug_verify_stored_missing) {
// build missing
if (debug_verify_stored_missing || info.last_complete < info.last_update) {
ldpp_dout(dpp, 10)
Expand Down Expand Up @@ -1438,7 +1439,7 @@ struct PGLog : DoutPrefixProvider {
}
}
} else {
assert(force_rebuild_missing);
assert(must_rebuild);
for (map<eversion_t, hobject_t>::reverse_iterator i =
divergent_priors.rbegin();
i != divergent_priors.rend();
Expand Down Expand Up @@ -1492,7 +1493,7 @@ struct PGLog : DoutPrefixProvider {
}
}

if (!force_rebuild_missing) {
if (!must_rebuild) {
if (clear_divergent_priors)
(*clear_divergent_priors) = false;
missing.flush();
Expand Down