]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PG: do not purge strays in premerge state
authorSage Weil <sage@redhat.com>
Fri, 10 Aug 2018 13:50:42 +0000 (08:50 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:09:42 +0000 (12:09 -0500)
commitce53eb332931bee8b1528f9dbee96f5075db19db
tree68f892c18dcec6099babc2f6475e23e98779a68a
parent5eba9ba0745379679a3325a74e52d30e44e26462
osd/PG: do not purge strays in premerge state

The point of premerge is to ensure that the constituent parts of the
target PG are fully clean.  If there is an intervening PG migration and
one of the halves finishes migrating before the other, one half could
get removed and the final merge could result in an incomplete PG.  In the
worst case, the two halves (let's call them A and B) could have started
out together on say [0,1,2], A moves to [3,4,5] and gets deleted from
[0,1,2], and then the final merge happens such that *all* copies of the PG
are incomplete.

We could construct a clever check that does allow removal of strays when
the sibling PG is also ready to go, but it would be complicated.  Do the
simple thing.  In reality, this would be an extremely hard case to hit
because the premerge window is generally very short.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PG.h