Skip to content

Commit

Permalink
rgw: improve handling of already removed buckets in object expirer.
Browse files Browse the repository at this point in the history
Fixes: ceph#13326
Backport: infernalis
Signed-off-by: Radoslaw Zarzynski <[email protected]>
  • Loading branch information
Radoslaw Zarzynski committed Oct 2, 2015
1 parent a467db1 commit 81c2374
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rgw/rgw_object_expirer_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ int RGWObjectExpirer::garbage_single_object(objexp_hint_entry& hint)
RGWBucketInfo bucket_info;

int ret = init_bucket_info(hint.bucket_name, hint.bucket_id, bucket_info);
if (ret < 0) {
ldout(store->ctx(), 1) << "ERROR: could not init bucket: " << cpp_strerror(-ret) << dendl;
if (-ENOENT == ret) {
ldout(store->ctx(), 15) << "NOTICE: cannot find bucket = " \
<< hint.bucket_name << ". The object must be already removed" << dendl;
return -ERR_PRECONDITION_FAILED;
} else if (ret < 0) {
ldout(store->ctx(), 1) << "ERROR: could not init bucket = " \
<< hint.bucket_name << "due to ret = " << ret << dendl;
return ret;
}

Expand Down

0 comments on commit 81c2374

Please sign in to comment.