summaryrefslogtreecommitdiffstats
path: root/src/osd/OSD.cc
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-02-14 23:03:56 +0100
committerSamuel Just <sam.just@inktank.com>2013-02-14 23:57:38 +0100
commit4dfcad44431855ba7d68a1ccb41dc3cb5db6bb50 (patch)
tree37003d621e568a347bc22ed9d3e03df148d7f953 /src/osd/OSD.cc
parentjava: make CephMountTest use user.* xattr names (diff)
downloadceph-4dfcad44431855ba7d68a1ccb41dc3cb5db6bb50.tar.xz
ceph-4dfcad44431855ba7d68a1ccb41dc3cb5db6bb50.zip
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 <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to '')
-rw-r--r--src/osd/OSD.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index e56818ed523..09fb58400e9 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() &&