]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PG: set CREATING pg state bit until we peer for the first time 1627/head
authorSage Weil <sage@inktank.com>
Tue, 8 Apr 2014 19:26:19 +0000 (12:26 -0700)
committerSage Weil <sage@inktank.com>
Tue, 8 Apr 2014 19:26:19 +0000 (12:26 -0700)
commit79ac2f79d6f0ec20278f3bbea2149720c1941537
tree1bf3ae7811044ce494e75d248650c466eb62c485
parent2a6d962f476efaa586f64b68b7f62a9deae22c44
osd/PG: set CREATING pg state bit until we peer for the first time

We send PG state updates to the monitor while creating a PG before the
actual creation and been finalized and persisted.  Because those updates
do not include the CREATING bit, the mon will remove the pgid from it's
creating set.  If the OSD(s) crash before persisting that PG creation, the
PG will never get created.

Fix this by leaving the CREATING bit set on the primary as long as
last_epoch_started==0.  That is, until we successfully peer for the very
first time.  Only then do we clear the bit and tell the monitor it's duty
is complete.

Fixes: #8001
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc