From: Sage Weil Date: Tue, 11 Sep 2018 16:12:22 +0000 (-0500) Subject: osd/PG: avoid choose_acting picking want with > pool size items X-Git-Tag: v14.0.1~310^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3e2990c39952a1fc4593076c5b2f0dea6cdcdd3;p=ceph-ci.git osd/PG: avoid choose_acting picking want with > pool size items If the pool size recently changed, we might see an up that is larger than the pool size. Or, we might already have selected a primary that is not part of up, and then add all up osds and end up with a want that is too big. Fixes: http://tracker.ceph.com/issues/35924 Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a2466a99cb7..35c33db309c 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1400,6 +1400,9 @@ void PG::calc_replicated_acting( acting_backfill->insert(up_cand); ss << " osd." << i << " (up) accepted " << cur_info << std::endl; } + if (want->size() >= size) { + break; + } } if (want->size() >= size) {