]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: increment stas on recovery pull also 10152/head
authorKefu Chai <kchai@redhat.com>
Wed, 6 Jul 2016 11:41:54 +0000 (19:41 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 6 Jul 2016 12:00:58 +0000 (20:00 +0800)
PGMap::recovery_rate_summary() summaries the recovery progress from
a pool's
pool_stat_t.stats.sum.num_{objects_recovered,bytes_recovered,keys_recovered},
now we only increment stats on completion of recovery push, but there
are chances that a PG recovers by pulling data from replicas to primary.
in that case, teuthology will erroneously consider recovery hung: a zero
recovering_keys_per_sec or recovering_bytes_per_sec or
recovering_objects_per_sec. so we should increment stats on pull as
well.

Fixes: http://tracker.ceph.com/issues/16277
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/ReplicatedBackend.cc

index eb580144b7f19a5c1132f67023a4dc42454b264e..f363d780a08fc13d50ee775c39357e27795a04e8 100644 (file)
@@ -1832,7 +1832,11 @@ bool ReplicatedBackend::handle_pull_response(
                   pop.omap_entries,
                   t);
 
+  pi.stat.num_keys_recovered += pop.omap_entries.size();
+  pi.stat.num_bytes_recovered += data.length();
+
   if (complete) {
+    pi.stat.num_objects_recovered++;
     to_continue->push_back(hoid);
     get_parent()->on_local_recover(
       hoid, pi.recovery_info, pi.obc, t);