]> git-server-git.apps.pok.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)
committerPrashant D <pdhange@redhat.com>
Thu, 30 Aug 2018 03:10:27 +0000 (23:10 -0400)
Fixes: http://tracker.ceph.com/issues/22837
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 0e9d64387547f4586194f1a41f21ff07462d8d34)

src/osd/PG.cc

index 29d200b810e19076f1dfce7ed409e2503636758f..b29cbd48c8699e4d4bb571d26a572895d8936496 100644 (file)
@@ -693,7 +693,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, "
@@ -1836,8 +1835,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