]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: add pool to uinfo cache keys
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 26 Jun 2019 20:22:37 +0000 (13:22 -0700)
committerCasey Bodley <cbodley@redhat.com>
Mon, 29 Jul 2019 19:20:49 +0000 (15:20 -0400)
To differentiate between the different uinfo cache indexes

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/services/svc_user_rados.cc

index d6d29b881b77d5a8ed3184e1e73013bcd7baca5d..6c4af55ae5b5a0e469078c0ec7a17ad605be16f1 100644 (file)
@@ -491,8 +491,9 @@ int RGWSI_User_RADOS::get_user_info_from_index(RGWSI_MetaBackend::Context *_ctx,
 {
   RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
 
-#warning uinfo_cache needs to add index to lookup
-  if (auto e = uinfo_cache->find(key)) {
+  string cache_key = pool.to_str() + "/" + key;
+
+  if (auto e = uinfo_cache->find(cache_key)) {
     *info = e->info;
     if (objv_tracker)
       *objv_tracker = e->objv_tracker;
@@ -526,7 +527,7 @@ int RGWSI_User_RADOS::get_user_info_from_index(RGWSI_MetaBackend::Context *_ctx,
     return -EIO;
   }
 
-  uinfo_cache->put(svc.cache, key, &e, { &cache_info }, y);
+  uinfo_cache->put(svc.cache, cache_key, &e, { &cache_info }, y);
 
   *info = e.info;
   if (objv_tracker)