]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: set bucket attrs are a bucket instance meta operation
authorYehuda Sadeh <yehuda@inktank.com>
Sat, 27 Jul 2013 08:12:49 +0000 (01:12 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 29 Jul 2013 22:06:56 +0000 (15:06 -0700)
Need to do the action through the bucket instance handler
and not through the bucket handler, otherwise it's wrongly
recorded (and wrongly replayed, ouch).

Fixes: #5791
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_bucket.cc

index bf8da99d616da5298c9a5be2ba9937625b69ee5c..d32af5df601a3efe1d6c9c40967c1dfeea59b293 100644 (file)
@@ -202,7 +202,11 @@ int rgw_bucket_set_attrs(RGWRados *store, rgw_bucket& bucket,
   string oid;
   store->get_bucket_meta_oid(bucket, oid);
   rgw_obj obj(store->zone.domain_root, oid);
-  return store->meta_mgr->set_attrs(bucket_meta_handler, oid,
+
+  string key;
+  store->get_bucket_instance_entry(bucket, key); /* we want the bucket instance name without
+                                                   the oid prefix cruft */
+  return store->meta_mgr->set_attrs(bucket_instance_meta_handler, key,
                                     obj, attrs, rmattrs, objv_tracker);
 }