]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: chained cache doesn't init if not caching
authorYehuda Sadeh <yehuda@redhat.com>
Sun, 16 Sep 2018 09:50:03 +0000 (02:50 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 8 Nov 2018 17:19:29 +0000 (09:19 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/services/svc_sys_obj_cache.h

index f16ef4fa8db85811e1e00565c51a8f65e5b60818..a7110607c28aec3f78c7f00355e1a9a715d6f87a 100644 (file)
@@ -107,6 +107,9 @@ public:
   RGWChainedCacheImpl() : lock("RGWChainedCacheImpl::lock") {}
 
   void init(RGWSI_SysObj_Cache *svc) {
+    if (!svc) {
+      return;
+    }
     svc->register_chained_cache(this);
     expiry = std::chrono::seconds(svc->ctx()->_conf.get_val<uint64_t>(
                                    "rgw_cache_expiry_interval"));