Mailing List Archive

[master] 9210cd770 Only count exp_mailed events when actually posting
commit 9210cd7709b3026d1ff6bc8ed78e1119d3d3eda5
Author: Martin Blix Grydeland <martin@varnish-software.com>
Date: Thu Mar 19 13:35:28 2020 +0100

Only count exp_mailed events when actually posting

When posting to the expiry thread, we wrongly counted exp_mailed also if
the OC in question was already on the mail queue. This could cause a
discrepency between the exp_mailed and exp_received counters.

diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 293ced626..67d5b85ba 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -116,10 +116,10 @@ exp_mail_it(struct objcore *oc, uint8_t cmds)
else
VSTAILQ_INSERT_TAIL(&exphdl->inbox,
oc, exp_list);
+ VSC_C_main->exp_mailed++;
}
oc->exp_flags |= cmds | OC_EF_POSTED;
AN(oc->exp_flags & OC_EF_REFD);
- VSC_C_main->exp_mailed++;
AZ(pthread_cond_signal(&exphdl->condvar));
}
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit