From: Yehuda Sadeh Date: Tue, 1 May 2012 23:47:32 +0000 (-0700) Subject: rgw: normalize bucket/obj before updating cache X-Git-Tag: v0.47~64 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b41f4d14aa08b0fe386e364684984744d3548690;p=ceph.git rgw: normalize bucket/obj before updating cache 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 --- diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h index 6f32759df24c..79e544d42c1a 100644 --- a/src/rgw/rgw_cache.h +++ b/src/rgw/rgw_cache.h @@ -484,7 +484,10 @@ int RGWCache::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: