]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: cls: ceph::timespan tag_timeout wrong units 16026/head
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 29 Jun 2017 19:19:36 +0000 (15:19 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 29 Jun 2017 19:35:04 +0000 (15:35 -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>
src/cls/rgw/cls_rgw.cc

index 05cbb8ce9120b84e75d9ea0c174ab0a1b0c28bf7..9af96fe6ab4852fb4f9a706261f0fb3e3980a795 100644 (file)
@@ -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();