]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not send duplicated osdmap msg to not sync'ed osd 12784/head
authorMingxin Liu <mingxin@xsky.com>
Mon, 2 Jan 2017 05:20:10 +0000 (13:20 +0800)
committerMingxin Liu <mingxin@xsky.com>
Tue, 10 Jan 2017 03:14:02 +0000 (11:14 +0800)
prior to this change:
a peon may forward the pgstats to leader, and record it locally, but leader will
check if osd has the latest map before process, if not, will use a route op to
indicate peon to send it, then poen will delete routed op when fininaly send
out which make peon cannot send pgstatack when leader has processed the
pgstat update. so osd will always track it util reach a threshold block pgstats
sending, at worst, reopen mon session.
also, both leader and peon will send out the osdmap message to the osd.

after this change:
only the peon will send out the osdmap message. and the pgstatack message
will be routed to the osd as expected. so the osd will not keep track of the
"acked" pg stats in its queue forever before times out.

Fixes: http://tracker.ceph.com/issues/18458
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
src/mon/PGMonitor.cc

index f83a9241376123aabb18a8e580a3da949cd907d3..e9df086ba0004686a4026f4a2147cf9728aafc69 100644 (file)
@@ -705,7 +705,8 @@ bool PGMonitor::preprocess_pg_stats(MonOpRequestRef op)
   // only if they've had the map for a while.
   if (stats->had_map_for > 30.0 &&
       mon->osdmon()->is_readable() &&
-      stats->epoch < mon->osdmon()->osdmap.get_epoch())
+      stats->epoch < mon->osdmon()->osdmap.get_epoch() &&
+      !session->proxy_con)
     mon->osdmon()->send_latest_now_nodelete(op, stats->epoch+1);
 
   // Always forward the PGStats to the leader, even if they are the same as