]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: handle racing object puts when object doesn't exist 1105/head
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 16 Jan 2014 19:45:27 +0000 (11:45 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 16 Jan 2014 22:30:53 +0000 (14:30 -0800)
commit86c15480fc3e33b9a3b84d0af68d8398fc732bae
tree02539b8dbaa5cc758e89d5f4de3a86b03b04a4af
parent5c24a7ea905587fd4077e3b0cfc0f5ad2b178c29
rgw: handle racing object puts when object doesn't exist

If the object didn't exist before and now we have multiple puts coming
in concurrently, we need to make sure that we behave correctly. Only one
needs to win, the other one can fail silently. We do that by setting
exclusive flag on the object creation and handling the error correctly.
Note that we still want to return -EEXIST in some cases (when the
exclusive flag is passed to put_obj_meta(), e.g., on bucket creation).

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