os/bluestore: fix remove_collection to properly detect collection e… #11398

Merged
merged 1 commit into from Oct 14, 2016

Projects

None yet

2 participants

@ifed01
Contributor
ifed01 commented Oct 10, 2016

…mptiness when onodes aren't in memory

Signed-off-by: Igor Fedotov ifedotov@mirantis.com

@ifed01 ifed01 added the bluestore label Oct 10, 2016
@ifed01 ifed01 changed the title from os/bluestore: fix remove_collection to properly detect collection's e… to os/bluestore: fix remove_collection to properly detect collection e… Oct 10, 2016
@ifed01 ifed01 added the bug fix label Oct 10, 2016
@liewegas

Logic looks good, just formatting nits!

src/os/bluestore/BlueStore.cc
+ r = _collection_list(c->get(), ghobject_t(), ghobject_t::get_max(), true, nonexistent_count + 1,
+ &ls, &next);
+
+ if ( r>=0 ) {
@liewegas
liewegas Oct 13, 2016 Member

if (r >= 0) {

src/os/bluestore/BlueStore.cc
+
+ if ( r>=0 ) {
+ bool exists = false; //ls.size() > nonexistent_count;
+ for( auto it = ls.begin(); !exists && it < ls.end(); ++it) {
@liewegas
liewegas Oct 13, 2016 Member

misplaced whitesapce

src/os/bluestore/BlueStore.cc
+ if ( r>=0 ) {
+ bool exists = false; //ls.size() > nonexistent_count;
+ for( auto it = ls.begin(); !exists && it < ls.end(); ++it) {
+ dout(10)<<__func__<<" oid " << *it << dendl;
@liewegas
liewegas Oct 13, 2016 Member

missing whitespace

src/os/bluestore/BlueStore.cc
+ dout(10) << __func__ << " " << *it
+ << " exists in db" << dendl;
+ }
+ }
@liewegas
liewegas Oct 13, 2016 Member

indentation here is all weird?

@ifed01
Contributor
ifed01 commented Oct 13, 2016

@liewegas fixed.

@ifed01 ifed01 os/bluestore: fix remove_collection to properly detect collection's e…
…mpty

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
620b0dc
@liewegas liewegas merged commit d620aad into ceph:master Oct 14, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@ifed01 ifed01 deleted the ifed01:wip-bluestore-rmcoll-fix branch Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment