From: Sage Weil Date: Sat, 17 Mar 2018 19:50:27 +0000 (-0500) Subject: osd/PG: wait for pushes and last_update_applied before requesting replica scrub X-Git-Tag: v13.0.2~3^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46a3c3c0eb1024c107c11cdb7f025aede9c9b079;p=ceph.git osd/PG: wait for pushes and last_update_applied before requesting replica scrub Wait on the primary for the EC backend to finish r/m/w cycles before we ask the replicas to scrub. Otherwise we will wait on the primary but the replicas will scrub immediately and we'll get a mismatched result! Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 27bf64733898..368055f8b9e8 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4720,22 +4720,6 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) } } - // ask replicas to scan - scrubber.waiting_on_whom.insert(pg_whoami); - - // request maps from replicas - for (set::iterator i = actingbackfill.begin(); - i != actingbackfill.end(); - ++i) { - if (*i == pg_whoami) continue; - _request_scrub_map(*i, scrubber.subset_last_update, - scrubber.start, scrubber.end, scrubber.deep, - scrubber.preempt_left > 0); - scrubber.waiting_on_whom.insert(*i); - } - dout(10) << __func__ << " waiting_on_whom " << scrubber.waiting_on_whom - << dendl; - scrubber.state = PG::Scrubber::WAIT_PUSHES; break; @@ -4756,6 +4740,22 @@ void PG::chunky_scrub(ThreadPool::TPHandle &handle) break; } + // ask replicas to scan + scrubber.waiting_on_whom.insert(pg_whoami); + + // request maps from replicas + for (set::iterator i = actingbackfill.begin(); + i != actingbackfill.end(); + ++i) { + if (*i == pg_whoami) continue; + _request_scrub_map(*i, scrubber.subset_last_update, + scrubber.start, scrubber.end, scrubber.deep, + scrubber.preempt_left > 0); + scrubber.waiting_on_whom.insert(*i); + } + dout(10) << __func__ << " waiting_on_whom " << scrubber.waiting_on_whom + << dendl; + scrubber.state = PG::Scrubber::BUILD_MAP; scrubber.primary_scrubmap_pos.reset(); break;