]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix data corruption due to network jitter 48274/head
authorlu.shasha <lu.shasha@aishu.cn>
Thu, 18 Aug 2022 07:07:42 +0000 (15:07 +0800)
committerSatoru Takeuchi <satoru.takeuchi@gmail.com>
Wed, 28 Sep 2022 02:46:02 +0000 (02:46 +0000)
commitb1ef8f95eb533cb63695e54f11ce49d8b5e2a3cf
tree4baacab33253b38f166cc689f23719e695e68339
parent966bd07c7933dde97fbebe5b6735924d693c5fe3
rgw: fix data corruption due to network jitter

In function RGWRados::Object::Write::_do_write_meta rgw_rados_operate may return -ETIMEDOUT due to network jitter.
But head obj may eventually be written successfully even if return -ETIMEDOUT. Due to r < 0, meta.canceled be set true.
In such scenario, all the tail objects will removed in the destructor of RadosWriter, then data corruptted.
To avoid data corruption, when return -ETIMEDOUT, should clear all objects in RadosWriter.

Signed-off-by: Shasha Lu <lu.shasha@aishu.cn>
(cherry picked from commit 04282ae3c1d19bf185ee1df148eb84deb244630f)
src/rgw/rgw_putobj_processor.cc