From: Yehuda Sadeh Date: Fri, 26 Apr 2013 02:23:12 +0000 (-0700) Subject: rgw: trivial cleanups post code review X-Git-Tag: v0.61~88^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1670a2bffb56ba1016b9897a729ea7eb77771add;p=ceph.git rgw: trivial cleanups post code review Following code review of #4760. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 77d5af73a77a..be2d1d43e35e 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -672,17 +672,8 @@ void RGWListBuckets::execute() if (ret < 0) { /* hmm.. something wrong here.. the user was authenticated, so it - should exist, just try to recreate */ + should exist */ ldout(s->cct, 10) << "WARNING: failed on rgw_get_user_buckets uid=" << s->user.user_id << dendl; - - /* - - on a second thought, this is probably a bug and we should fail - - rgw_put_user_buckets(s->user.user_id, buckets); - ret = 0; - - */ break; } map& m = buckets.get_buckets(); @@ -723,18 +714,8 @@ void RGWStatAccount::execute() ret = rgw_read_user_buckets(store, s->user.user_id, buckets, marker, max_buckets, true); if (ret < 0) { /* hmm.. something wrong here.. the user was authenticated, so it - should exist, just try to recreate */ + should exist */ ldout(s->cct, 10) << "WARNING: failed on rgw_get_user_buckets uid=" << s->user.user_id << dendl; - - /* - - on a second thought, this is probably a bug and we should fail - - rgw_put_user_buckets(s->user.user_id, buckets); - ret = 0; - - */ - break; } else { map& m = buckets.get_buckets(); diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index 16e8f348778d..f0f773b5ac82 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -121,6 +121,8 @@ public: virtual const char *name() { return "get_obj"; } }; +#define RGW_LIST_BUCKETS_LIMIT_MAX 10000 + class RGWListBuckets : public RGWOp { protected: int ret; @@ -131,7 +133,7 @@ protected: public: RGWListBuckets() : ret(0), sent_data(false) { - limit = limit_max = 10000; + limit = limit_max = RGW_LIST_BUCKETS_LIMIT_MAX; } int verify_permission();