[master] e142af75d cache_backend: set the backend happy bitfield to all-one if no probe
Nils Goroll
nils.goroll at uplex.de
Mon Sep 30 16:54:05 UTC 2024
commit e142af75decb675a554434a48e65e55bd0267f0c
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Sep 30 18:46:31 2024 +0200
cache_backend: set the backend happy bitfield to all-one if no probe
Fixes #4201
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 977933772..d3a98ac56 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -893,6 +893,7 @@ VRT_new_backend_clustered(VRT_CTX, struct vsmw_cluster *vc,
m = vbe_methods;
} else {
be->sick = 0;
+ be->vsc->happy = UINT64_MAX;
m = vbe_methods_noprobe;
}
diff --git a/bin/varnishtest/tests/v00003.vtc b/bin/varnishtest/tests/v00003.vtc
index 21fa9607e..b89680d74 100644
--- a/bin/varnishtest/tests/v00003.vtc
+++ b/bin/varnishtest/tests/v00003.vtc
@@ -17,10 +17,18 @@ varnish v1 -arg "-p vcl_cooldown=1" \
.port = "${s1_port}";
.probe = { .interval = 1s; }
}
+ backend noprobe {
+ .host = "${s1_addr}";
+ .port = "${s1_port}";
+ }
+ sub vcl_backend_fetch {
+ set bereq.backend = noprobe;
+ }
} -start
# We only have one vcl yet
varnish v1 -expect VBE.vcl1.default.happy >= 0
+varnish v1 -expect VBE.vcl1.noprobe.happy > 9223372036854775808
varnish v1 -expect !VBE.vcl2.default.happy
varnish v1 -cliok "backend.list -p *.*"
More information about the varnish-commit
mailing list