]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cls: ceph::timespan tag_timeout wrong units 16289/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 29 Jun 2017 19:19:36 +0000 (15:19 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 12 Jul 2017 12:23:20 +0000 (08:23 -0400)
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 <mbenjamin@redhat.com>
(cherry picked from commit e6763ebd6124c1b4736c5c7850077df7644bc8f5)

src/cls/rgw/cls_rgw.cc

index 86dcc66b58035f151f4c3f08fa11615b121017e2..2a8de1a8121da20122d0799092c88664eedda34a 100644 (file)
@@ -1904,7 +1904,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();