From: Josh Durgin Date: Fri, 6 May 2011 19:23:45 +0000 (-0700) Subject: PG: choose_acting needs the value of the osd, not its index X-Git-Tag: v0.28~67 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=621af5e319784e25240c4bd40129d37497f03ccc;p=ceph.git PG: choose_acting needs the value of the osd, not its index This caused two osds to keep flipping the acting set between [2] and [0,2] when osd.0 was far behind and needed a backlog. This is visible as toggling between peering and peering+degraded. Signed-off-by: Josh Durgin --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2d30100e75e..48c770328b3 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4293,7 +4293,7 @@ PG::RecoveryState::GetLog::GetLog(my_context ctx) : newest_update, oldest_update); - if (!pg->choose_acting(newest_update_osd == -1 ? 0 : newest_update_osd)) { + if (!pg->choose_acting(newest_update_osd == -1 ? pg->osd->whoami : newest_update_osd)) { post_event(NeedNewMap()); } else { if (need_backlog && !pg->log.backlog) {