]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PG: restrict want_acting to up+acting on recovery completion 13420/head
authorSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 20:00:09 +0000 (15:00 -0500)
committerSage Weil <sage@redhat.com>
Tue, 14 Feb 2017 20:00:09 +0000 (15:00 -0500)
commit0f2dee9aa48a00a7f2f809cd4d20e98df771da81
tree0dfe6306c5ac52bb9ca0200a1993dff9a405572f
parent61ac1b41da18a8846bac635b2b8fde70a2b609e3
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>
src/osd/PG.cc
src/osd/PG.h