Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the ban lurker skip busy objects

If the ban lurker finds a busy object, skip the object and defer the
checking to a later pass.

No test case because it is very timing sensitive (but see the trac bug
report for a VTC-file that mostly triggers it on the 3.0 branch only)

Fixes: #1162
  • Loading branch information...
commit 0c9975c1be926799c368d904dd65204eca25ed50 1 parent 116393f
@mbgrydeland mbgrydeland authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 bin/varnishd/cache/cache_ban.c
View
12 bin/varnishd/cache/cache_ban.c
@@ -879,6 +879,18 @@ ban_lurker_work(struct worker *wrk, struct vsl_log *vsl, unsigned pass)
continue;
}
/*
+ * If the object is busy, we can't touch
+ * it. Defer it to a later run.
+ */
+ if (oc->flags & OC_F_BUSY) {
+ oc->flags |= pass;
+ VTAILQ_REMOVE(&b->objcore, oc, ban_list);
+ VTAILQ_INSERT_TAIL(&b->objcore, oc, ban_list);
+ Lck_Unlock(&oh->mtx);
+ Lck_Unlock(&ban_mtx);
+ continue;
+ }
+ /*
* Grab a reference to the OC and we can let go of
* the BAN mutex
*/
Please sign in to comment.
Something went wrong with that request. Please try again.