os/bluestore: fix _split_collections race with osr_reap #11748

Merged
merged 1 commit into from Nov 3, 2016

Projects

None yet

2 participants

@liewegas
Member
liewegas commented Nov 2, 2016

The SharedBlobSet may not yet be empty at split time because previous
transactions may not have been reaped, leaving some Blobs still alive
even after the cache refs are cleared. Drop them explicitly here (they
will go away shortly).

Signed-off-by: Sage Weil sage@redhat.com

@liewegas
Member
liewegas commented Nov 3, 2016

@ifed01 mind taking a look?

src/os/bluestore/BlueStore.cc
+ // shortly by _osr_reap_done, but it's awkward to block for that (and
+ // a waste of time). Instead, explicitly remove them from the shared blob
+ // map.
+ c->shared_blob_set.violently_clear();
assert(c->shared_blob_set.empty());
@ifed01
ifed01 Nov 3, 2016 Contributor

no need for this assert any more.

src/os/bluestore/BlueStore.cc
+ // shortly by _osr_reap_done, but it's awkward to block for that (and
+ // a waste of time). Instead, explicitly remove them from the shared blob
+ // map.
+ c->shared_blob_set.violently_clear();
assert(c->shared_blob_set.empty());
assert(d->shared_blob_set.empty());
@ifed01
ifed01 Nov 3, 2016 Contributor

Not sure if this makes much sense but is it possible that destination collection struggles (or will struggle one day) with the same issue? Does it worth to clear its shared_blob_set the same way? Just in case...

@liewegas
Member
liewegas commented Nov 3, 2016
@liewegas liewegas os/bluestore: fix _split_collections race with osr_reap
The SharedBlobSet may not yet be empty at split time because previous
transactions may not have been reaped, leaving some Blobs still alive
even after the cache refs are cleared.  Drop them explicitly here (they
will go away shortly).

Signed-off-by: Sage Weil <sage@redhat.com>
d420986
@ifed01 ifed01 merged commit 8e1e51a into ceph:master Nov 3, 2016

1 of 2 checks passed

default Build started sha1 is merged.
Details
Signed-off-by all commits in this PR are signed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment