]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting
authorSage Weil <sage@inktank.com>
Tue, 20 May 2014 17:46:34 +0000 (10:46 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 May 2014 17:46:34 +0000 (10:46 -0700)
We will set lb=hobject_t() if we resurrect the pg.  In that case,
we need to have sent that to the primary before hand.  If we
finish the removal before the pg is recreated, we'll just end
up backfilling it, which is ok since the pg doesn't exist anyway.

Fixes: #7740
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 04de781765dd5ac0e28dd1a43cfe85020c0854f8)

Conflicts:

src/osd/OSD.cc

src/osd/OSD.cc

index e6e884db3790d765effae484a251482490d5ec51..b6345e4efac552a9276725fad90dd68283d3eb3e 100644 (file)
@@ -6523,6 +6523,11 @@ void OSD::handle_pg_query(OpRequestRef op)
     assert(role != 0);
     dout(10) << " pg " << pgid << " dne" << dendl;
     pg_info_t empty(pgid);
+    /* This is racy, but that should be ok: if we complete the deletion
+     * before the pg is recreated, we'll just start it off backfilling
+     * instead of just empty */
+    if (service.deleting_pgs.lookup(pgid))
+      empty.last_backfill = hobject_t();
     if (it->second.type == pg_query_t::LOG ||
        it->second.type == pg_query_t::FULLLOG) {
       ConnectionRef con = service.get_con_osd_cluster(from, osdmap->get_epoch());