mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
BUG/MEDIUM: stconn: Report a send activity everytime data were sent
When read/write timeouts were refactored in 2.8, we decided to change when a send activity had to be reported. Before, everytime some data were sent a send activity were reported. At this time, the channel's wex timer were updated. During the refactoring, we decided to limit send activity to sends that ampty te channel's buffer, consuming all outgoing data. Idea behind this change was to protect haproxy against clients consumming data very slowly. However, it is too strict. Some congested muxes but still active can hit the client or the server timeout. It seems a bit unfair. It is especially visible with QUIC/H3 but it is probably also possible with H2 if the window size is small. The better is to restore the old behavior. This patch must be backported to 2.8.
This commit is contained in:
parent
94d0f77deb
commit
3083fd90e1
11
src/stconn.c
11
src/stconn.c
@ -1691,6 +1691,11 @@ static int sc_conn_send(struct stconn *sc)
|
||||
oc->flags |= CF_WRITE_EVENT | CF_WROTE_DATA;
|
||||
if (sc->state == SC_ST_CON)
|
||||
sc->state = SC_ST_RDY;
|
||||
sc_ep_report_send_activity(sc);
|
||||
}
|
||||
else {
|
||||
if (sc_state_in(sc->state, SC_SB_EST|SC_SB_DIS|SC_SB_CLO))
|
||||
sc_ep_report_blocked_send(sc);
|
||||
}
|
||||
|
||||
if (!sco->room_needed || (did_send && (sco->room_needed < 0 || channel_recv_max(sc_oc(sc)) >= sco->room_needed)))
|
||||
@ -1704,13 +1709,9 @@ static int sc_conn_send(struct stconn *sc)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (channel_is_empty(oc))
|
||||
sc_ep_report_send_activity(sc);
|
||||
else {
|
||||
if (!channel_is_empty(oc)) {
|
||||
/* We couldn't send all of our data, let the mux know we'd like to send more */
|
||||
conn->mux->subscribe(sc, SUB_RETRY_SEND, &sc->wait_event);
|
||||
if (sc_state_in(sc->state, SC_SB_EST|SC_SB_DIS|SC_SB_CLO))
|
||||
sc_ep_report_blocked_send(sc);
|
||||
}
|
||||
|
||||
return did_send;
|
||||
|
Loading…
Reference in New Issue
Block a user