Fix for saintmode
artur at fastly.com
Tue Feb 21 22:10:17 CET 2012
Saintmode sadly locks on every request to vbe_healthy, this means if you do req.backend.healty you acquire the lock.
It does this even if the list is empty. Following patch fix this, it introduces a tiny race which I am happy to live with.
@@ -266,7 +266,7 @@ vbe_Healthy(double now, uintptr_t target, struct backend *backend)
threshold = backend->saintmode_threshold;
/* Saintmode is disabled */
- if (threshold == 0)
+ if (threshold == 0 || VTAILQ_EMPTY(&backend->troublelist))
/* No need to test if we don't have an object head to test against.
More information about the varnish-dev