From: Samuel Just Date: Thu, 14 Feb 2013 22:03:56 +0000 (-0800) Subject: OSD: always activate_map in advance_pgs, only send messages if up X-Git-Tag: v0.57~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4dfcad44431855ba7d68a1ccb41dc3cb5db6bb50;p=ceph.git OSD: always activate_map in advance_pgs, only send messages if up We should always handle_activate_map() after handle_advance_map() in order to kick the pg into a valid peering state for processing requests prior to dropping the lock. Additionally, we would prefer to avoid sending irrelevant messages during boot, so only send if we are up according to the current service osdmap. Fixes: #4064 Backport: bobtail Signed-off-by: Samuel Just Reviewed-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e56818ed523d..09fb58400e9b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4282,8 +4282,7 @@ void OSD::advance_pg( lastmap = nextmap; handle.reset_tp_timeout(); } - if (!is_booting()) - pg->handle_activate_map(rctx); + pg->handle_activate_map(rctx); } /** @@ -5098,11 +5097,13 @@ bool OSD::compat_must_dispatch_immediately(PG *pg) void OSD::dispatch_context(PG::RecoveryCtx &ctx, PG *pg, OSDMapRef curmap) { - do_notifies(*ctx.notify_list, curmap); + if (service.get_osdmap()->is_up(whoami)) { + do_notifies(*ctx.notify_list, curmap); + do_queries(*ctx.query_map, curmap); + do_infos(*ctx.info_map, curmap); + } delete ctx.notify_list; - do_queries(*ctx.query_map, curmap); delete ctx.query_map; - do_infos(*ctx.info_map, curmap); delete ctx.info_map; if ((ctx.on_applied->empty() && ctx.on_safe->empty() &&