[master] 96c9ea216 wake up vbp_thread after a probe is done

Nils Goroll nils.goroll at uplex.de
Wed Apr 17 08:42:07 UTC 2019


commit 96c9ea2163ccf420070af34ae21295f6fd1c7d80
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Apr 17 10:36:45 2019 +0200

    wake up vbp_thread after a probe is done
    
    The due time of the probe which has just finished may be earlier than
    the previously earliest due time, so vbp_thread needs to be woken up to
    update the nxt value
    
    Fixes #2976

diff --git a/bin/varnishd/cache/cache_backend_probe.c b/bin/varnishd/cache/cache_backend_probe.c
index 136c7413a..6dda4273a 100644
--- a/bin/varnishd/cache/cache_backend_probe.c
+++ b/bin/varnishd/cache/cache_backend_probe.c
@@ -439,6 +439,7 @@ vbp_task(struct worker *wrk, void *priv)
 			vt->due = VTIM_real() + vt->interval;
 			binheap_delete(vbp_heap, vt->heap_idx);
 			binheap_insert(vbp_heap, vt);
+			AZ(pthread_cond_signal(&vbp_cond));
 		}
 	}
 	Lck_Unlock(&vbp_mtx);


More information about the varnish-commit mailing list