]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: upper bound watch_check result 9400/head
authorSage Weil <sage@redhat.com>
Fri, 6 May 2016 13:09:43 +0000 (09:09 -0400)
committerVicente Cheng <freeze.bilsted@gmail.com>
Tue, 31 May 2016 02:46:19 +0000 (10:46 +0800)
This way we always return a safe upper bound on the amount of time
since we did a check.  Among other things, this prevents us from
returning a value of 0, which is confusing.

Fixes: http://tracker.ceph.com/issues/15760
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 2e2ce365866a7569b55aff338a82c132aa927089)

Conflicts:
src/osdc/Objecter.cc
    By https://github.com/ceph/ceph/pull/8967, simply add 1 to return vaule.

src/osdc/Objecter.cc

index 9bdbe5aafa96d14a814394e983be520576a2b036..95700eb109bc30d8c8559d6fe3b6a57ab6ea3061 100644 (file)
@@ -629,7 +629,8 @@ int Objecter::linger_check(LingerOp *info)
                 << " age " << age << dendl;
   if (info->last_error)
     return info->last_error;
-  return age.to_msec();
+  // return a safe upper bound (we are truncating to ms)
+  return 1 + age.to_msec();
 }
 
 void Objecter::linger_cancel(LingerOp *info)