]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: pubsub: doesn't support quota
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 6 Jul 2018 00:39:58 +0000 (17:39 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 11 Dec 2018 08:10:42 +0000 (00:10 -0800)
Check if handler supports quota, pubsub doesn't.

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

index dec114b90de4299efc282ea75617d652ac11fd97..f993c350d26e8f886128b5ad03683c06be229eab 100644 (file)
@@ -104,6 +104,10 @@ public:
   virtual int postauth_init() = 0;
   virtual int error_handler(int err_no, std::string* error_content);
   virtual void dump(const string& code, const string& message) const {}
+
+  virtual bool supports_quota() {
+    return true;
+  }
 };
 
 
@@ -141,9 +145,11 @@ public:
   int get_ret() const { return op_ret; }
 
   virtual int init_processing() {
-    op_ret = init_quota();
-    if (op_ret < 0)
-      return op_ret;
+    if (dialect_handler->supports_quota()) {
+      op_ret = init_quota();
+      if (op_ret < 0)
+        return op_ret;
+    }
 
     return 0;
   }
index cb0d4d0c9a9e0625f588fad4507a029aa3500eaa..8d014534864b018127fd64fdd14539337b53fcb7 100644 (file)
@@ -277,6 +277,9 @@ public:
 
 class RGWHandler_REST_PSTopic_S3 : public RGWHandler_REST_S3 {
 protected:
+  bool supports_quota() override {
+    return false;
+  }
   RGWOp *op_get() override {
     if (s->init_state.url_bucket.empty()) {
       return nullptr;