]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: trivial cleanups post code review
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 26 Apr 2013 02:23:12 +0000 (19:23 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 26 Apr 2013 19:10:14 +0000 (12:10 -0700)
Following code review of #4760.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_op.cc
src/rgw/rgw_op.h

index 77d5af73a77a3b45d4bc07e8b5fe95b96dcde052..be2d1d43e35e65431784428ce8b4474647b0fbda 100644 (file)
@@ -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();
index 16e8f348778da4bcdac0821893b9a17332ace29f..f0f773b5ac829b093d94c2b9937fce12c0b94a42 100644 (file)
@@ -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();