mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
rgw_bucket.cc: return error if update_containers_stats() fails
In case need_stats is set on rgw_read_user_buckets() and the update_containers_stats() call fails with !-ENOENT, not only print out a message but also return the error to the function caller. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
aafed10cd6
commit
9a716d88bb
@ -74,9 +74,10 @@ int rgw_read_user_buckets(RGWRados *store, string user_id, RGWUserBuckets& bucke
|
|||||||
|
|
||||||
if (need_stats) {
|
if (need_stats) {
|
||||||
map<string, RGWBucketEnt>& m = buckets.get_buckets();
|
map<string, RGWBucketEnt>& m = buckets.get_buckets();
|
||||||
int r = store->update_containers_stats(m);
|
ret = store->update_containers_stats(m);
|
||||||
if (r < 0) {
|
if (ret < 0 && ret != -ENOENT) {
|
||||||
ldout(store->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
|
ldout(store->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user