Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: os/FileStore: don't propagate split/merge error to "create"/"remove" #40989

Merged
merged 1 commit into from Apr 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 35 additions & 13 deletions src/os/filestore/HashIndex.cc
Expand Up @@ -552,15 +552,23 @@ int HashIndex::_created(const vector<string> &path,
dout(1) << __func__ << " " << path << " has " << info.objs
<< " objects, starting split in pg " << coll() << "." << dendl;
int r = initiate_split(path, info);
if (r < 0)
return r;
r = complete_split(path, info);
dout(1) << __func__ << " " << path << " split completed in pg " << coll() << "."
<< dendl;
return r;
} else {
return 0;
if (r < 0) {
derr << __func__ << " error starting split " << path << " in pg "
<< coll() << ": " << cpp_strerror(r) << dendl;
ceph_assert(!cct->_conf->filestore_fail_eio);
} else {
r = complete_split(path, info);
if (r < 0) {
derr << __func__ << " error completing split " << path << " in pg "
<< coll() << ": " << cpp_strerror(r) << dendl;
ceph_assert(!cct->_conf->filestore_fail_eio);
}
dout(1) << __func__ << " " << path << " split completed in pg " << coll()
<< "." << dendl;
}
}

return 0;
}

int HashIndex::_remove(const vector<string> &path,
Expand All @@ -578,14 +586,28 @@ int HashIndex::_remove(const vector<string> &path,
r = set_info(path, info);
if (r < 0)
return r;

if (must_merge(info)) {
dout(1) << __func__ << " " << path << " has " << info.objs
<< " objects, starting merge in pg " << coll() << "." << dendl;
r = initiate_merge(path, info);
if (r < 0)
return r;
return complete_merge(path, info);
} else {
return 0;
if (r < 0) {
derr << __func__ << " error starting merge " << path << " in pg "
<< coll() << ": " << cpp_strerror(r) << dendl;
ceph_assert(!cct->_conf->filestore_fail_eio);
} else {
r = complete_merge(path, info);
if (r < 0) {
derr << __func__ << " error completing merge " << path << " in pg "
<< coll() << ": " << cpp_strerror(r) << dendl;
ceph_assert(!cct->_conf->filestore_fail_eio);
}
dout(1) << __func__ << " " << path << " merge completed in pg " << coll()
<< "." << dendl;
}
}

return 0;
}

int HashIndex::_lookup(const ghobject_t &oid,
Expand Down