From: David Zafman Date: Thu, 1 Feb 2018 02:31:15 +0000 (-0800) Subject: osd: Always build peer_missing (including strays) for _update_calc_stats() X-Git-Tag: v13.1.0~565^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e9d64387547f4586194f1a41f21ff07462d8d34;p=ceph.git osd: Always build peer_missing (including strays) for _update_calc_stats() Fixes: http://tracker.ceph.com/issues/22837 Signed-off-by: David Zafman --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 0e80ad9dae10..ee65daf2a3ae 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -712,7 +712,6 @@ void PG::discover_all_missing(map > &query_map) { auto &missing = pg_log.get_missing(); uint64_t unfound = get_num_unfound(); - assert(unfound > 0); dout(10) << __func__ << " " << missing.num_missing() << " missing, " @@ -1882,8 +1881,8 @@ void PG::activate(ObjectStore::Transaction& t, build_might_have_unfound(); - if (have_unfound()) - discover_all_missing(query_map); + // Always call now so _update_calc_stats() will be accurate + discover_all_missing(query_map); } // num_objects_degraded if calculated should reflect this too, unless no