From: Yehuda Sadeh Date: Fri, 6 Jul 2018 00:39:58 +0000 (-0700) Subject: rgw: pubsub: doesn't support quota X-Git-Tag: v14.1.0~616^2~42 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f6ccc6d7bddb32784f2bfb41d5b6d9c1986d2742;p=ceph-ci.git rgw: pubsub: doesn't support quota Check if handler supports quota, pubsub doesn't. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index dec114b90de..f993c350d26 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -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; } diff --git a/src/rgw/rgw_sync_module_pubsub_rest.cc b/src/rgw/rgw_sync_module_pubsub_rest.cc index cb0d4d0c9a9..8d014534864 100644 --- a/src/rgw/rgw_sync_module_pubsub_rest.cc +++ b/src/rgw/rgw_sync_module_pubsub_rest.cc @@ -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;