]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: preserve source collection cache during split 12574/head
authorSage Weil <sage@redhat.com>
Mon, 19 Dec 2016 22:04:26 +0000 (17:04 -0500)
committerSage Weil <sage@redhat.com>
Mon, 19 Dec 2016 22:05:00 +0000 (17:05 -0500)
commitec5ba4e8cf90c70b3468bb7c3c67568ccb08b2e2
tree56656a81f19001642563a78320605a91c5cc2db4
parentdc639fd9e5113d42cae3df6e029b3b0462353579
os/bluestore: preserve source collection cache during split

OSD split transactions look something like

 mkcoll new
 split old
 ...
 omap_rmkey_range old
 omap_setkeys old
 omap_setkeys new

The last part splits the log into two pieces.  The
problem is that the rmkey_range needs to wait on old
omap transactions to flush, and those are linked to the
old onode, and split clears the cache.  The result is
that we don't wait, rmkeyrange leaves some recent pg log
keys behind, and on OSD restart we get an error because
the object doesn't belong to the (old) collection.

Fix this by preserving objects in the old collection and
only clear out objects that are moving to the newly
split collections.  This will include the pgmeta object
that we care about.

(Note that we are one step closer to preserving the
cache contents across the split, but not quite there
yet: at this point we don't have all of the destination
collections.  A change in the ObjectStore interface is
probably needed to make that not be extremely awkward.)

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h