Revision: 14352
Author: adrian.chadd
Date: Mon Nov  2 21:23:40 2009
Log: There's a weird Squid bug where the client db garbage collector event  
is scheduled
lots and lots of times. Attempt to fix this.


http://code.google.com/p/lusca-cache/source/detail?r=14352

Modified:
  /branches/LUSCA_HEAD/src/HttpReply.c
  /branches/LUSCA_HEAD/src/client_db.c

=======================================
--- /branches/LUSCA_HEAD/src/HttpReply.c        Mon Nov  2 05:56:52 2009
+++ /branches/LUSCA_HEAD/src/HttpReply.c        Mon Nov  2 21:23:40 2009
@@ -402,7 +402,7 @@
       * when we've already -done- that, but I'll worry about doing it
       * faster later. Besides, there's too much other code to fix up.
       */
-#if 1
+#if 0
      httpReplyHdrCacheInit(dst);
  #else
      dst->content_length = src->content_length;
=======================================
--- /branches/LUSCA_HEAD/src/client_db.c        Tue Aug  4 08:00:11 2009
+++ /branches/LUSCA_HEAD/src/client_db.c        Mon Nov  2 21:23:40 2009
@@ -80,8 +80,8 @@
      c->addr = addr;
      hash_join(client_table, &c->hash);
      statCounter.client_http.clients++;
-    if ((statCounter.client_http.clients > max_clients)  
&& !cleanup_running && cleanup_scheduled < 2) {
-       cleanup_scheduled++;
+    if ((statCounter.client_http.clients > max_clients)  
&& !cleanup_running && !cleanup_scheduled) {
+       cleanup_scheduled = 1;
        eventAdd("client_db garbage collector", clientdbScheduledGC, NULL, 90, 
0);
      }
      return c;
@@ -310,7 +310,7 @@
        bucket = 0;
        cleanup_running = 0;
        max_clients = statCounter.client_http.clients * 3 / 2;
-       if (!cleanup_scheduled) {
+       if (! cleanup_scheduled) {
            cleanup_scheduled = 1;
            eventAdd("client_db garbage collector", clientdbScheduledGC, NULL, 
3  
* 3600, 0);
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to