From aa2252a08c8fe6bfaa9f087163d805b4e3e97261 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 27 Jul 2009 11:09:39 -0700 Subject: [PATCH] osd: generate primary backlog independent of master log We may have the master log (i.e. know the correct pg state), but still need a backlog to recover some peers. --- src/osd/PG.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 5688ad6deb577..1aa3e0afd0169 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1132,16 +1132,6 @@ bool PG::recover_master_log(map< int, map >& query_map) have_master_log = true; - - // -- do i need to generate backlog for any of my peers? - if (oldest_update < log.tail && !log.backlog) { - dout(10) << "must generate backlog for some peers, my tail " - << log.tail << " > oldest_update " << oldest_update - << dendl; - osd->queue_generate_backlog(this); - return false; - } - return true; } @@ -1166,6 +1156,16 @@ void PG::peer(ObjectStore::Transaction& t, return; + // -- do i need to generate backlog for any of my peers? + if (oldest_update < log.tail && !log.backlog) { + dout(10) << "must generate backlog for some peers, my tail " + << log.tail << " > oldest_update " << oldest_update + << dendl; + osd->queue_generate_backlog(this); + return; + } + + /** COLLECT MISSING+LOG FROM PEERS **********/ /* we also detect divergent replicas here by pulling the full log -- 2.39.5