[master] 350e158d8 Retire the MAIN.sess_drop VSC
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Sep 27 10:23:06 UTC 2019
commit 350e158d86453356c4519ad67bf60e69e8fc9505
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Sep 27 12:21:51 2019 +0200
Retire the MAIN.sess_drop VSC
When de16dba24abf landed its documentation was mixed up with the other
sess_dropped counter. When sess_dropped appeared in ac393c4b825a the
sess_drop counter was still function, it died short after as a side
effect of ac2e067b0dac.
diff --git a/bin/varnishd/VSC_main.vsc b/bin/varnishd/VSC_main.vsc
index 0377f9659..ca5704267 100644
--- a/bin/varnishd/VSC_main.vsc
+++ b/bin/varnishd/VSC_main.vsc
@@ -27,12 +27,6 @@
Count of sessions successfully accepted
-.. varnish_vsc:: sess_drop
- :group: wrk
- :oneliner: Sessions dropped
-
- Count of sessions silently dropped due to lack of worker thread.
-
.. varnish_vsc:: sess_fail
:group: wrk
:oneliner: Session accept failures
diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 3336fd89f..68e61524e 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -373,19 +373,6 @@ vca_make_session(struct worker *wrk, void *arg)
/* Turn accepted socket into a session */
AN(wrk->aws->r);
sp = SES_New(wrk->pool);
- if (sp == NULL) {
- /*
- * We consider this a DoS situation and silently close the
- * connection with minimum effort and fuzz, rather than try
- * to send an intelligent message back.
- */
- vca_pace_bad();
- VTCP_nonblocking(wa->acceptsock);
- closefd(&wa->acceptsock);
- wrk->stats->sess_drop++;
- WS_Release(wrk->aws, 0);
- return;
- }
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
wrk->stats->s_sess++;
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 875129f68..647b43665 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -365,7 +365,8 @@ SES_New(struct pool *pp)
CHECK_OBJ_NOTNULL(pp, POOL_MAGIC);
sp = MPL_Get(pp->mpl_sess, &sz);
- sp->magic = SESS_MAGIC;
+ AN(sp);
+ INIT_OBJ(sp, SESS_MAGIC);
sp->pool = pp;
sp->refcnt = 1;
memset(sp->sattr, 0xff, sizeof sp->sattr);
diff --git a/bin/varnishtest/tests/t02011.vtc b/bin/varnishtest/tests/t02011.vtc
index 9c2269e74..45ec730c6 100644
--- a/bin/varnishtest/tests/t02011.vtc
+++ b/bin/varnishtest/tests/t02011.vtc
@@ -72,7 +72,6 @@ client c1 {
varnish v1 -cliok "param.set thread_pool_min 3"
delay 1
varnish v1 -vsl_catchup
-varnish v1 -expect sess_drop == 0
varnish v1 -expect sess_dropped == 0
varnish v1 -expect req_dropped == 1
varnish v1 -expect MEMPOOL.req0.live == 0
diff --git a/doc/changes.rst b/doc/changes.rst
index ac1b47902..06ebc0630 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -30,7 +30,7 @@ release process.
NEXT (2020-03-15)
================================
-(nothing yet)
+* The ``MAIN.sess_drop`` counter is gone.
================================
Varnish Cache 6.3.0 (2019-09-15)
More information about the varnish-commit
mailing list