]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: choose_acting needs the value of the osd, not its index
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 6 May 2011 19:23:45 +0000 (12:23 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 6 May 2011 19:25:25 +0000 (12:25 -0700)
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 <josh.durgin@dreamhost.com>
src/osd/PG.cc

index 2d30100e75ef646b3868f31bb2b3f5adf9ac5139..48c770328b38706451c73316be1c955a001f279c 100644 (file)
@@ -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) {