]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Always build peer_missing (including strays) for _update_calc_stats()
authorDavid Zafman <dzafman@redhat.com>
Thu, 1 Feb 2018 02:31:15 +0000 (18:31 -0800)
committerDavid Zafman <dzafman@redhat.com>
Wed, 14 Mar 2018 17:07:11 +0000 (10:07 -0700)
Fixes: http://tracker.ceph.com/issues/22837
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PG.cc

index 0e80ad9dae10b7eeb2cc7821535ed0ed819539fd..ee65daf2a3ae7d98db40955489100119813eaf5a 100644 (file)
@@ -712,7 +712,6 @@ void PG::discover_all_missing(map<int, map<spg_t,pg_query_t> > &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