]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: bucket marker contains zone name
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 14 Jun 2013 22:01:33 +0000 (15:01 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 14 Jun 2013 22:01:33 +0000 (15:01 -0700)
(issue 5347)
We need this so that raw object names on different zones within
the same region don't collide.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index 88fbc891e438a1553f6683844f9b8b7e68a35039..e12fd4ff5839a5fd57bcf04730393eb956ccc438 100644 (file)
@@ -1670,7 +1670,7 @@ int RGWRados::create_bucket(string& owner, rgw_bucket& bucket,
     uint64_t iid = instance_id();
     uint64_t bid = next_bucket_id();
     char buf[32];
-    snprintf(buf, sizeof(buf), "%llu.%llu", (long long)iid, (long long)bid); 
+    snprintf(buf, sizeof(buf), "%s.%llu.%llu", zone.name.c_str(), (long long)iid, (long long)bid);
     bucket.marker = buf;
     bucket.bucket_id = bucket.marker;