summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-02-14 14:03:56 -0800
committerSamuel Just <sam.just@inktank.com>2013-03-29 12:07:16 -0700
commit8cb13a195c592fd2f17889e77d717c1864f97dca (patch)
treefedf64d9bb1fa4cb1f219a18f47b68031ebe6381
parentd89ab0ea6fa8d0961cad82f6a81eccbd3bbd3f55 (diff)
downloadceph-8cb13a195c592fd2f17889e77d717c1864f97dca.tar.gz
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: #4572 Backport: bobtail Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 4dfcad44431855ba7d68a1ccb41dc3cb5db6bb50)
-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 07fef776f80..70e1859d62a 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -4128,8 +4128,7 @@ void OSD::advance_pg(
lastmap = nextmap;
handle.reset_tp_timeout();
}
- if (!is_booting())
- pg->handle_activate_map(rctx);
+ pg->handle_activate_map(rctx);
}
/**
@@ -4964,11 +4963,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() &&