]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pgmon: create PGs with a creation epoch that matches the pool's
authorGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 4 Aug 2011 23:11:43 +0000 (16:11 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Thu, 4 Aug 2011 23:11:43 +0000 (16:11 -0700)
Previously, the PGs were created with a creation date of the current
OSDMap. However, under some circumstances the PG creation can occur
under a later OSDMap epoch. This could lead to client requests that
were sent under epoch n, while the OSD insisted that the PG was
created in epoch n+1 so the client request was invalid. Since the
OSD expects the client to resubmit requests in such circumstances,
and the client thought all was well, this led to hanging client
requests.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mon/PGMonitor.cc

index 1367ac057de22df095f4e98bd1d5cea9ab647da7..5670b95e5e5a82c14049dedef9abeb57a0c0c541 100644 (file)
@@ -649,7 +649,7 @@ bool PGMonitor::register_new_pgs()
          continue;
        }
        created++;
-       register_pg(pool, pgid, epoch, new_pool);
+       register_pg(pool, pgid, pool.get_last_change(), new_pool);
       }
     }
   }