MEDIUM: proxy: remove the unused PR_STFULL state
Since v1.4 or so, it's almost not possible anymore to set this state. The
only exception is by using the CLI to change a frontend's maxconn setting
below its current usage. This case makes no sense, and for other cases it
doesn't make sense either because "full" is a vague concept when only
certain listeners are full and not all. Let's just remove this unused
state and make it clear that it's not reported. The "ready" or "open"
states will continue to be reported without being misleading as they
will be opposed to "stop".
diff --git a/src/proxy.c b/src/proxy.c
index a901f53..d3c207e 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -1118,15 +1118,8 @@
goto out;
/* check the various reasons we may find to block the frontend */
- if (unlikely(p->feconn >= p->maxconn)) {
- if (p->state == PR_STREADY)
- p->state = PR_STFULL;
+ if (unlikely(p->feconn >= p->maxconn))
goto out;
- }
-
- /* OK we have no reason to block, so let's unblock if we were blocking */
- if (p->state == PR_STFULL)
- p->state = PR_STREADY;
if (p->fe_sps_lim &&
(wait = next_event_delay(&p->fe_sess_per_sec, p->fe_sps_lim, 0))) {
diff --git a/src/stats.c b/src/stats.c
index 8752788..132011d 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -1629,7 +1629,7 @@
stats[ST_F_EREQ] = mkf_u64(FN_COUNTER, px->fe_counters.failed_req);
stats[ST_F_DCON] = mkf_u64(FN_COUNTER, px->fe_counters.denied_conn);
stats[ST_F_DSES] = mkf_u64(FN_COUNTER, px->fe_counters.denied_sess);
- stats[ST_F_STATUS] = mkf_str(FO_STATUS, px->state == PR_STREADY ? "OPEN" : px->state == PR_STFULL ? "FULL" : "STOP");
+ stats[ST_F_STATUS] = mkf_str(FO_STATUS, px->state == PR_STREADY ? "OPEN" : "STOP");
stats[ST_F_PID] = mkf_u32(FO_KEY, relative_pid);
stats[ST_F_IID] = mkf_u32(FO_KEY|FS_SERVICE, px->uuid);
stats[ST_F_SID] = mkf_u32(FO_KEY|FS_SERVICE, 0);