From: Matt Benjamin Date: Thu, 29 Jun 2017 19:19:36 +0000 (-0400) Subject: rgw: cls: ceph::timespan tag_timeout wrong units X-Git-Tag: v12.1.1~176^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e6763ebd6124c1b4736c5c7850077df7644bc8f5;p=ceph.git rgw: cls: ceph::timespan tag_timeout wrong units In rgw_dir_suggest(), the ceph::timespan tag_timeout is intended to be a value in seconds, but has been taken as something much smaller (millis?). The incorrect time scale likely induces a race condition with object deletes. Fixes: http://tracker.ceph.com/issues/20380 Signed-off-by: Matt Benjamin --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 05cbb8ce9120..9af96fe6ab48 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -1875,7 +1875,9 @@ int rgw_dir_suggest_changes(cls_method_context_t hctx, bufferlist *in, bufferlis return rc; } - timespan tag_timeout(header.tag_timeout ? header.tag_timeout : CEPH_RGW_TAG_TIMEOUT); + timespan tag_timeout( + std::chrono::seconds( + header.tag_timeout ? header.tag_timeout : CEPH_RGW_TAG_TIMEOUT)); bufferlist::iterator in_iter = in->begin();