From: Samuel Just Date: Mon, 15 Sep 2014 23:53:21 +0000 (-0700) Subject: PG::find_best_info: let history.last_epoch_started provide a lower bound X-Git-Tag: v0.86~55^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2519%2Fhead;p=ceph.git PG::find_best_info: let history.last_epoch_started provide a lower bound If we find a info.history.last_epoch_started above any info.last_epoch_started, we must be missing updates and min_last_update_acceptable should provisionally be max(). Fixes: #9482 Backport: firefly Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2c86f3ba2d25..826b55939b50 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -867,6 +867,10 @@ map::const_iterator PG::find_best_info( for (map::const_iterator i = infos.begin(); i != infos.end(); ++i) { + if (max_last_epoch_started_found < i->second.history.last_epoch_started) { + min_last_update_acceptable = eversion_t::max(); + max_last_epoch_started_found = i->second.history.last_epoch_started; + } if (max_last_epoch_started_found < i->second.last_epoch_started) { min_last_update_acceptable = eversion_t::max(); max_last_epoch_started_found = i->second.last_epoch_started; @@ -876,7 +880,8 @@ map::const_iterator PG::find_best_info( min_last_update_acceptable = i->second.last_update; } } - assert(min_last_update_acceptable != eversion_t::max()); + if (min_last_update_acceptable == eversion_t::max()) + return infos.end(); map::const_iterator best = infos.end(); // find osd with newest last_update (oldest for ec_pool).