]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: store user info on all indexes in the same format
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 18 Apr 2011 15:32:09 +0000 (08:32 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 18 Apr 2011 15:32:09 +0000 (08:32 -0700)
this breaks backward compatibility, we'll have to deal with that
later.

src/rgw/rgw_user.cc

index baa4cec4f4f2fd7abdb1d93ad7cde76fd9653a0f..fc7a73505a0ff2f3b7ceb711fc16ef35de936283 100644 (file)
@@ -120,16 +120,16 @@ int rgw_store_user_info(RGWUserInfo& info)
     }
   }
 
-  ret = put_obj(info.user_id, ui_uid_bucket, info.user_id, data, bl.length());
-  if (ret < 0)
-    return ret;
-
   bufferlist uid_bl;
   RGWUID ui;
   ui.user_id = info.user_id;
   ::encode(ui, uid_bl);
   ::encode(info, uid_bl);
 
+  ret = put_obj(info.user_id, ui_uid_bucket, info.user_id, uid_bl.c_str(), uid_bl.length());
+  if (ret < 0)
+    return ret;
+
   if (info.user_email.size()) {
     ret = put_obj(info.user_id, ui_email_bucket, info.user_email, uid_bl.c_str(), uid_bl.length());
     if (ret < 0)