mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 17:46:57 +02:00
DEBUG: http-ana: Remove debug counters from HTTP analyzers
Several debug counters were added in HTTP analyzers to help debugging a strange issue about early aborts. But these counters are a bit overkill now. Especially because it is now possible to rely on the termination event log. So just remove them. Note that these counters are still there in 3.1.
This commit is contained in:
parent
274c9d21a6
commit
1c6512f8fc
@ -1015,10 +1015,8 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||||||
* response. Otherwise, let a change to forward the response
|
* response. Otherwise, let a change to forward the response
|
||||||
* first.
|
* first.
|
||||||
*/
|
*/
|
||||||
if (txn->rsp.msg_state >= HTTP_MSG_BODY && htx_is_empty(htxbuf(&s->res.buf))) {
|
if (txn->rsp.msg_state >= HTTP_MSG_BODY && htx_is_empty(htxbuf(&s->res.buf)))
|
||||||
COUNT_IF(1, "Server abort during request forwarding");
|
|
||||||
goto return_srv_abort;
|
goto return_srv_abort;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
http_end_request(s);
|
http_end_request(s);
|
||||||
@ -1050,10 +1048,8 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||||||
|
|
||||||
missing_data_or_waiting:
|
missing_data_or_waiting:
|
||||||
/* stop waiting for data if the input is closed before the end */
|
/* stop waiting for data if the input is closed before the end */
|
||||||
if (msg->msg_state < HTTP_MSG_ENDING && (s->scf->flags & (SC_FL_ABRT_DONE|SC_FL_EOS))) {
|
if (msg->msg_state < HTTP_MSG_ENDING && (s->scf->flags & (SC_FL_ABRT_DONE|SC_FL_EOS)))
|
||||||
COUNT_IF(1, "Client abort during request forwarding");
|
|
||||||
goto return_cli_abort;
|
goto return_cli_abort;
|
||||||
}
|
|
||||||
|
|
||||||
waiting:
|
waiting:
|
||||||
/* waiting for the last bits to leave the buffer */
|
/* waiting for the last bits to leave the buffer */
|
||||||
@ -1061,10 +1057,8 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||||||
/* Handle server aborts only if there is no response. Otherwise,
|
/* Handle server aborts only if there is no response. Otherwise,
|
||||||
* let a change to forward the response first.
|
* let a change to forward the response first.
|
||||||
*/
|
*/
|
||||||
if (htx_is_empty(htxbuf(&s->res.buf))) {
|
if (htx_is_empty(htxbuf(&s->res.buf)))
|
||||||
COUNT_IF(1, "Server abort during request forwarding");
|
|
||||||
goto return_srv_abort;
|
goto return_srv_abort;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When TE: chunked is used, we need to get there again to parse remaining
|
/* When TE: chunked is used, we need to get there again to parse remaining
|
||||||
@ -1128,7 +1122,6 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||||||
_HA_ATOMIC_INC(&__objt_server(s->target)->counters.internal_errors);
|
_HA_ATOMIC_INC(&__objt_server(s->target)->counters.internal_errors);
|
||||||
stream_report_term_evt(s->scf, strm_tevt_type_internal_err);
|
stream_report_term_evt(s->scf, strm_tevt_type_internal_err);
|
||||||
status = 500;
|
status = 500;
|
||||||
COUNT_IF(1, "Internal error during request forwarding");
|
|
||||||
goto return_prx_cond;
|
goto return_prx_cond;
|
||||||
|
|
||||||
return_bad_req:
|
return_bad_req:
|
||||||
@ -1137,7 +1130,6 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
|
|||||||
_HA_ATOMIC_INC(&sess->listener->counters->failed_req);
|
_HA_ATOMIC_INC(&sess->listener->counters->failed_req);
|
||||||
stream_report_term_evt(s->scf, strm_tevt_type_proto_err);
|
stream_report_term_evt(s->scf, strm_tevt_type_proto_err);
|
||||||
status = 400;
|
status = 400;
|
||||||
COUNT_IF(1, "Request parsing error during request forwarding");
|
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
||||||
return_prx_cond:
|
return_prx_cond:
|
||||||
@ -2182,7 +2174,6 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
if ((s->scf->flags & SC_FL_SHUT_DONE) && co_data(res)) {
|
if ((s->scf->flags & SC_FL_SHUT_DONE) && co_data(res)) {
|
||||||
/* response errors are most likely due to the client aborting
|
/* response errors are most likely due to the client aborting
|
||||||
* the transfer. */
|
* the transfer. */
|
||||||
COUNT_IF(1, "Client abort during response forwarding");
|
|
||||||
goto return_cli_abort;
|
goto return_cli_abort;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2196,10 +2187,8 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
missing_data_or_waiting:
|
missing_data_or_waiting:
|
||||||
if (s->scf->flags & SC_FL_SHUT_DONE) {
|
if (s->scf->flags & SC_FL_SHUT_DONE)
|
||||||
COUNT_IF(1, "Client abort during response forwarding");
|
|
||||||
goto return_cli_abort;
|
goto return_cli_abort;
|
||||||
}
|
|
||||||
|
|
||||||
/* stop waiting for data if the input is closed before the end. If the
|
/* stop waiting for data if the input is closed before the end. If the
|
||||||
* client side was already closed, it means that the client has aborted,
|
* client side was already closed, it means that the client has aborted,
|
||||||
@ -2208,15 +2197,11 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
*/
|
*/
|
||||||
if (msg->msg_state < HTTP_MSG_ENDING && (s->scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) {
|
if (msg->msg_state < HTTP_MSG_ENDING && (s->scb->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) {
|
||||||
if ((s->scf->flags & SC_FL_ABRT_DONE) &&
|
if ((s->scf->flags & SC_FL_ABRT_DONE) &&
|
||||||
(s->scb->flags & SC_FL_SHUT_DONE)) {
|
(s->scb->flags & SC_FL_SHUT_DONE))
|
||||||
COUNT_IF(1, "Client abort during response forwarding");
|
|
||||||
goto return_cli_abort;
|
goto return_cli_abort;
|
||||||
}
|
|
||||||
/* If we have some pending data, we continue the processing */
|
/* If we have some pending data, we continue the processing */
|
||||||
if (htx_is_empty(htx)) {
|
if (htx_is_empty(htx))
|
||||||
COUNT_IF(1, "Server abort during response forwarding");
|
|
||||||
goto return_srv_abort;
|
goto return_srv_abort;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When TE: chunked is used, we need to get there again to parse
|
/* When TE: chunked is used, we need to get there again to parse
|
||||||
@ -2276,7 +2261,6 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
_HA_ATOMIC_INC(&__objt_server(s->target)->counters.internal_errors);
|
_HA_ATOMIC_INC(&__objt_server(s->target)->counters.internal_errors);
|
||||||
if (!(s->flags & SF_ERR_MASK))
|
if (!(s->flags & SF_ERR_MASK))
|
||||||
s->flags |= SF_ERR_INTERNAL;
|
s->flags |= SF_ERR_INTERNAL;
|
||||||
COUNT_IF(1, "Internal error during response forwarding");
|
|
||||||
stream_report_term_evt(s->scb, strm_tevt_type_internal_err);
|
stream_report_term_evt(s->scb, strm_tevt_type_internal_err);
|
||||||
goto return_error;
|
goto return_error;
|
||||||
|
|
||||||
@ -2287,7 +2271,6 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
|
|||||||
health_adjust(__objt_server(s->target), HANA_STATUS_HTTP_RSP);
|
health_adjust(__objt_server(s->target), HANA_STATUS_HTTP_RSP);
|
||||||
}
|
}
|
||||||
stream_inc_http_fail_ctr(s);
|
stream_inc_http_fail_ctr(s);
|
||||||
COUNT_IF(1, "Response parsing error during response forwarding");
|
|
||||||
stream_report_term_evt(s->scb, strm_tevt_type_proto_err);
|
stream_report_term_evt(s->scb, strm_tevt_type_proto_err);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user