[master] de4743d Don't bother with busyobj delivering already completed objects.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Aug 27 14:13:59 CEST 2014
commit de4743dc5c21688385f326bd582c397704a79f71
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Aug 27 12:13:17 2014 +0000
Don't bother with busyobj delivering already completed objects.
(This doesn't _quite_ close the race, but at least test c00034 is
much more stable now.)
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 0e5d188..e97d81d 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -169,6 +169,8 @@ cnt_deliver(struct worker *wrk, struct req *req)
/* Grab a ref to the bo if there is one, and hand it down */
bo = HSH_RefBusy(req->objcore);
+ if (bo != NULL && bo->state == BOS_FINISHED)
+ VBO_DerefBusyObj(wrk, &bo);
V1D_Deliver(req, bo);
if (bo != NULL)
VBO_DerefBusyObj(wrk, &bo);
More information about the varnish-commit
mailing list