• Dag Erling Smørgrav's avatar
    Merged revisions 1709-1722 via svnmerge from · 630957a1
    Dag Erling Smørgrav authored
    svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
    
    ........
      r1710 | des | 2007-07-17 12:33:46 +0200 (Tue, 17 Jul 2007) | 9 lines
      
      Fix child restart by always calling close_sockets() when the child dies;
      otherwise open_sockets() fails, which causes start_child() to fail silently.
      
      Furthermore, if open_sockets() fails and child_state is CH_DIED, it will
      not be possible to start it manually later; therefore, set child_state
      to CH_STOPPED when open_sockets() fails.
      
      Note: it wouldn't hurt if open_sockets() were a little more talkative.
    ........
      r1711 | des | 2007-07-17 15:05:08 +0200 (Tue, 17 Jul 2007) | 6 lines
      
      Amend previous commit.  The problem was that when a socket was already open,
      open_sockets() did not count it as "good".  Having fixed this, revert to the
      previous behaviour of keeping the sockets open if auto_restart is on; this
      avoids having a brief window (until they are reopened) during which client
      connections are refused.
    ........
      r1712 | des | 2007-07-17 18:56:21 +0200 (Tue, 17 Jul 2007) | 4 lines
      
      Remove object from LRU list before freeing it; this does not entirely
      eliminate races between the LRU code and the expiry code, but it does
      make them a lot less likely.
    ........
      r1713 | des | 2007-07-17 18:58:40 +0200 (Tue, 17 Jul 2007) | 2 lines
      
      Return count like the comment says we do.
    ........
      r1714 | des | 2007-07-17 19:06:12 +0200 (Tue, 17 Jul 2007) | 10 lines
      
      Assert that LRU_DiscardOne() returns 1, to avoid an unlikely but possible
      scenario where multiple clients each require different objects such that
      the sum of the sizes of the objects is larger than the cache (or, in the
      extreme case, one client requests an object which is larger than the
      cache) causing STV_alloc() to enter an infinite loop.
      
      This is not ideal - a better solution would be return NULL and have the
      caller deal with the problem, possibly by returning a 503 result, or by
      stalling the request for some time.
    ........
      r1715 | des | 2007-07-19 12:58:31 +0200 (Thu, 19 Jul 2007) | 2 lines
      
      gettimeofday() is good enough for varnishstat.
    ........
      r1716 | des | 2007-07-19 13:01:36 +0200 (Thu, 19 Jul 2007) | 2 lines
      
      If clock_gettime() is not available, use gettimeofday() directly.
    ........
      r1717 | des | 2007-07-19 13:02:57 +0200 (Thu, 19 Jul 2007) | 2 lines
      
      Retire libcompat's clock_gettime().
    ........
      r1718 | des | 2007-07-19 13:03:55 +0200 (Thu, 19 Jul 2007) | 2 lines
      
      Missed one occurrence of clock_gettime().
    ........
      r1719 | des | 2007-07-19 13:11:20 +0200 (Thu, 19 Jul 2007) | 4 lines
      
      Make regexp variables static.  This has the side effect of replacing
      tentative definitions with non-tentative ones, thus sidestepping one
      of the issues we have on MacOS X.
    ........
      r1720 | des | 2007-07-19 13:17:59 +0200 (Thu, 19 Jul 2007) | 4 lines
      
      Adapt for use on MacOS X / Darwin, which has GNU libtool installed as
      glibtool, and has a version of automake 1.6 which does not exhibit the
      bug I've observed on other platforms.
    ........
      r1721 | des | 2007-07-19 13:49:43 +0200 (Thu, 19 Jul 2007) | 3 lines
      
      Use the correct cc command line on MacOS.  This is a gross hack.
      Also, ignore the result of dlclose().
    ........
      r1722 | des | 2007-07-19 14:18:57 +0200 (Thu, 19 Jul 2007) | 2 lines
      
      Document Mac OS X compatibility.
    ........
    
    
    git-svn-id: http://www.varnish-cache.org/svn/branches/1.1@1723 d4fa192b-c00b-0410-8231-f00ffab90ce4
    630957a1
cache_lru.c 5.5 KB