]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: Fix multisite Synchronization failed when read and write delete at the same... 21390/head
authorNiu Pengju <pengju.niu@xtaotech.com>
Sun, 8 Apr 2018 03:08:04 +0000 (11:08 +0800)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 12 Apr 2018 17:39:16 +0000 (19:39 +0200)
commit84c9d0ec2145c9049e9c8323b8e684a6e199a752
tree922272288fa4322d9826655f59799c85dbdd52d8
parent207f12bb744baf6b6c1631ccb132b7143a37e19d
rgw: Fix multisite Synchronization failed when read and write delete at the same time

This case is first write objA,then write and delete objA at the same
time,write early than delete.
When del objA, use information which stat  of first write objA, so the
op should del the first write data.However when try to del objA, objA
header is second write, so osd "do_xattr_cmp_str" has found idtag change
and return -125(canceled),after rgw client receive the ret -125 , it
will still do "complete_del", then do cls_obj_complete_del to write
bilog。"complete_op" in cls_rgw module  will  write bilog with second
write mtime and second ".ver.epoch". Finally, del op append behind the
second write in bilog. And the slave rgw will merge write op and del op
as del op, and del data,but master rgw complete second write and cancel
del.
This logic is problematic,  so bilog recording the del op should use
cancel op. And squash_map should skip the cancel op.

Fixes: http://tracker.ceph.com/issues/22804
Signed-off-by: Niu Pengju <pengju.niu@xtaotech.com>
(cherry picked from commit a8fd508915a0acf7768fe6ba7f7414e71813f1d7)
src/rgw/rgw_data_sync.cc
src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc