[3.0] d1ba932 Do not consider busy objects as candidates in EXP_NukeOne.

Martin Blix Grydeland martin at varnish-cache.org
Thu Jul 19 10:41:28 CEST 2012


commit d1ba9327229e1b0a3cec78ad4071e9796f6b70a8
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Jul 4 13:25:08 2012 +0200

    Do not consider busy objects as candidates in EXP_NukeOne.
    
    An attempt to nuke a busy object will end in assertion.

diff --git a/bin/varnishd/cache_expire.c b/bin/varnishd/cache_expire.c
index 7fa48da..15482bf 100644
--- a/bin/varnishd/cache_expire.c
+++ b/bin/varnishd/cache_expire.c
@@ -431,9 +431,10 @@ EXP_NukeOne(struct worker *w, struct lru *lru)
 		/*
 		 * It wont release any space if we cannot release the last
 		 * reference, besides, if somebody else has a reference,
-		 * it's a bad idea to nuke this object anyway.
+		 * it's a bad idea to nuke this object anyway. Also do not
+		 * touch busy objects.
 		 */
-		if (oc->refcnt == 1)
+		if (oc->refcnt == 1 && !(oc->flags & OC_F_BUSY))
 			break;
 	}
 	if (oc != NULL) {



More information about the varnish-commit mailing list