]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume-client: allow atomic updates for RADOS objects
authorRishabh Dave <rishabhddave@gmail.com>
Thu, 7 Jun 2018 12:26:44 +0000 (12:26 +0000)
committerNathan Cutler <ncutler@suse.com>
Sun, 2 Sep 2018 14:16:06 +0000 (16:16 +0200)
commit735b855f56058f1aea3652e5240d8765708f5cfb
tree031a5ebd118a9c22192469e98e24cc7f737dfb45
parent42cfc1b5895a6eee8b7519d555b828ccf60ec2c0
ceph-volume-client: allow atomic updates for RADOS objects

put_object_versioned() takes the version of the object and verifies if
the version of the object is the expected one before updating the data
in the object. This verification of version before actually writing
makes put_objcet_version() atomic.

Rest of the changes include adding get_object_and_version() so that
current version of the object can be obtained and modification of
get_object() and put_object() to use get_object_and_version() and
put_object_versioned() respectively.

Fixes: http://tracker.ceph.com/issues/24173
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit ca7253cff6cdac590bb14d0d297c02452bf75bf6)
src/pybind/ceph_volume_client.py
src/pybind/rados/rados.pyx