You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2016/04/27 22:34:15 UTC

[trafficserver] 01/05: TS-4317: Prevent cache stripe recovery from infinite loop.

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 6.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 14951bfcdc88d2903e8cf96dd3d1366b68644c07
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Sat Apr 2 20:03:50 2016 -0500

    TS-4317: Prevent cache stripe recovery from infinite loop.
    
    (cherry picked from commit 6ff7aafe42d3d51d3ed8d12828920451c1d3fd34)
---
 iocore/cache/Cache.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 882bd4c..ae25d10 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1689,8 +1689,10 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
       if (s > e)
         s -= round_to_approx_size(doc->len);
       recover_pos -= e - s;
-      if (recover_pos >= skip + len)
+      if (recover_pos >= skip + len) {
+        recover_wrapped = 1;
         recover_pos = start;
+      }
       io.aiocb.aio_nbytes = RECOVERY_SIZE;
       if ((off_t)(recover_pos + io.aiocb.aio_nbytes) > (off_t)(skip + len))
         io.aiocb.aio_nbytes = (skip + len) - recover_pos;

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.