Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 a8fd508)
- Loading branch information