summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-04-25 19:23:12 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-04-25 19:23:12 -0700
commit3b32fd8843d61fea8628a1ecaf6983d11a526fc3 (patch)
tree1af9bc9822b6d8ed128f4dbb3baa4c646d1c4e97
parent9abec309e89ec738b6b45c328a08fc066ff2e7cc (diff)
downloadceph-3b32fd8843d61fea8628a1ecaf6983d11a526fc3.tar.gz
rgw: trivial cleanups post code review
Following code review of #4760. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_op.cc23
-rw-r--r--src/rgw/rgw_op.h4
2 files changed, 5 insertions, 22 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 7b8227af9cf..e443eddb7ec 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<string, RGWBucketEnt>& 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<string, RGWBucketEnt>& m = buckets.get_buckets();
diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h
index 16e8f348778..f0f773b5ac8 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();