]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: normalize bucket/obj before updating cache
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 1 May 2012 23:47:32 +0000 (16:47 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 1 May 2012 23:47:32 +0000 (16:47 -0700)
Fixes bug #2369. The problem was that sometimes we send the
notification with the un-normalized bucket/obj pair. We
should make sure that we use the caonical name before doing
any cache update.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/rgw/rgw_cache.h

index 6f32759df24c4882bc9125ca0a1a613f5e1e4c81..79e544d42c1aaac77e4c0754c7c46048597eeb9e 100644 (file)
@@ -484,7 +484,10 @@ int RGWCache<T>::watch_cb(int opcode, uint64_t ver, bufferlist& bl)
     return -EIO;
   }
 
-  string name = normal_name(info.obj);
+  rgw_bucket bucket;
+  string oid;
+  normalize_bucket_and_obj(info.obj.bucket, info.obj.object, bucket, oid);
+  string name = normal_name(bucket, oid);
 
   switch (info.op) {
   case UPDATE_OBJ: