]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: create collection in handle_pg_create before _create_lock_pg
authorSamuel Just <sam.just@inktank.com>
Tue, 11 Jun 2013 00:01:02 +0000 (17:01 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 11 Jun 2013 00:16:09 +0000 (17:16 -0700)
Fixes: #5270
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index 192b8f51adf535ac4cac335eca8a0344d7d7ca84..649b99f93c1fa32174ba07484b9abe99b9c7d51c 100644 (file)
@@ -5738,12 +5738,12 @@ void OSD::handle_pg_create(OpRequestRef op)
     PG *pg = NULL;
     if (can_create_pg(pgid)) {
       pg_interval_map_t pi;
+      rctx.transaction->create_collection(coll_t(pgid));
       pg = _create_lock_pg(
        osdmap, pgid, true, false, false,
        0, creating_pgs[pgid].acting, creating_pgs[pgid].acting,
        history, pi,
        *rctx.transaction);
-      rctx.transaction->create_collection(coll_t(pgid));
       pg->info.last_epoch_started = pg->info.history.last_epoch_started;
       creating_pgs.erase(pgid);
       wake_pg_waiters(pg->info.pgid);