From: David Zafman Date: Tue, 23 May 2017 01:43:08 +0000 (-0700) Subject: osd: Remove bogus assert and update missing_loc for mark_all_unfound_lost() X-Git-Tag: ses5-milestone8~1^2~19^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c1503a2b4520fd49e2015df1715ae670c74d78e;p=ceph.git osd: Remove bogus assert and update missing_loc for mark_all_unfound_lost() Fixes: http://tracker.ceph.com/issues/18165 Signed-off-by: David Zafman --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 4faae4005958..681b52f43de5 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2183,7 +2183,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op) fill_in_copy_get_noent(op, oid, m->ops[0]); return; } - dout(20) << __func__ << "find_object_context got error " << r << dendl; + dout(20) << __func__ << ": find_object_context got error " << r << dendl; if (op->may_write() && get_osdmap()->require_osd_release >= CEPH_RELEASE_KRAKEN) { record_write_error(op, oid, nullptr, r); @@ -10312,7 +10312,6 @@ eversion_t PrimaryLogPG::pick_newest_available(const hobject_t& oid) if (*i == get_primary()) continue; pg_shard_t peer = *i; if (!peer_missing[peer].is_missing(oid)) { - assert(is_backfill_targets(peer)); continue; } eversion_t h = peer_missing[peer].get_items().at(oid).have; @@ -10413,6 +10412,7 @@ void PrimaryLogPG::mark_all_unfound_lost( ceph_tid_t tid) { dout(3) << __func__ << " " << pg_log_entry_t::get_op_name(what) << dendl; + list oids; dout(30) << __func__ << ": log before:\n"; pg_log.get_log().print(*_dout); @@ -10477,6 +10477,7 @@ void PrimaryLogPG::mark_all_unfound_lost( } // otherwise, just do what we used to do dout(10) << e << dendl; log_entries.push_back(e); + oids.push_back(oid); ++v.version; ++m; @@ -10494,7 +10495,9 @@ void PrimaryLogPG::mark_all_unfound_lost( log_entries, std::move(manager), boost::optional >( - [=]() { + [this, oids, con, num_unfound, tid]() { + for (auto oid: oids) + missing_loc.recovered(oid); for (auto& p : waiting_for_unreadable_object) { release_backoffs(p.first); }