]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD::handle_pg_query: on dne pg, send lb=hobject_t() if deleting 1474/head
authorSamuel Just <sam.just@inktank.com>
Sun, 16 Mar 2014 00:58:35 +0000 (17:58 -0700)
committerSamuel Just <sam.just@inktank.com>
Sun, 16 Mar 2014 00:58:37 +0000 (17:58 -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>
src/osd/OSD.cc

index 54e0febeeb1d82cc2a52012f4e9ea97c305d7374..60a54a620b91a8ae6fe69553f19aff9303c856d2 100644 (file)
@@ -6938,6 +6938,11 @@ void OSD::handle_pg_query(OpRequestRef op)
 
     dout(10) << " pg " << pgid << " dne" << dendl;
     pg_info_t empty(spg_t(pgid.pgid, it->second.to));
+    /* 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());