]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PG: restrict want_acting to up+acting on recovery completion 13542/head
authorSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 20:00:09 +0000 (15:00 -0500)
committerShinobu Kinjo <shinobu@redhat.com>
Mon, 20 Feb 2017 16:58:16 +0000 (01:58 +0900)
commit1bc9cfff42237b572e90e976697b1ac5faafad4a
treed5e09cdbf589f4531a319533ae46433cf45aef0b
parentce8edcfed6cd908779efd229202eab1232d16f1c
osd/PG: restrict want_acting to up+acting on recovery completion

On recovery completion we recalculate want_acting to see if we
should add recently backfilled osds into acting.  However, at
this point we may have gotten infos from others OSDs outside
of up/acting that could be used for want_acting.  We currently
assert that only up/acting osds are used in
PG::RecoveryState::Active::react(const AdvMap&), so we must
restrict want_acting to up/acting here.

We could remove this restriction, but it would mean

1) checking on every map change that want_acting hasn't been
invalidated, and if so, recalculating want_acting and requesting
a new pg_temp.  Also, presumably

2) on each new info, checking whether we can construct a better
want_acting, and if so, doing it.

That would be a good thing, but is a more complicated change.  In
reality this case comes up very rarely, so simply make our
post-recovery want_acting calculation limit itself to up+acting.

See 1db67c443d84dc5d1ff53cc820fdfd4a2128b680 for the assertion.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 0f2dee9aa48a00a7f2f809cd4d20e98df771da81)
src/osd/PG.cc
src/osd/PG.h