From: Willy Tarreau Date: Mon, 20 Apr 2026 16:34:35 +0000 (+0200) Subject: MINOR: sample: make RQ/RS stats available everywhere X-Git-Tag: v3.4-dev10~129 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=6df10d080275f855717f6b8ed275d97a2a7c134b;p=haproxy.git MINOR: sample: make RQ/RS stats available everywhere Sample fetch functions working on the request/response stats were marked as being only compatible with the log phase. This is a mistake because by definitions, stats can be consulted anywhere from the moment they start to appear. It's only that they are valid as far as the logs. At the moment, no sample fetch function depends on RQFIN, and only res.timer.data depends on RSFIN. But this will be needed to relax certain sample fetch functions (and will need to be backported along with a few other patches). --- diff --git a/src/sample.c b/src/sample.c index a1e1c74ae..bc9dadff4 100644 --- a/src/sample.c +++ b/src/sample.c @@ -266,39 +266,39 @@ const unsigned int fetch_cap[SMP_SRC_ENTRIES] = { SMP_VAL___________ | SMP_VAL_BE_CHK_RUL | SMP_VAL___________ | SMP_VAL___________ ), - [SMP_SRC_RQFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | + [SMP_SRC_RQFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL_FE_REQ_CNT | + SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK | + SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY | + SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT | + SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL | + SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY | SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ ), [SMP_SRC_RSFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | + SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT | + SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL | + SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY | SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ ), - [SMP_SRC_TXFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | + [SMP_SRC_TXFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL_FE_REQ_CNT | + SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK | + SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY | + SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT | + SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL | + SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY | SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ ), - [SMP_SRC_SSFIN] = (SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | - SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ | + [SMP_SRC_SSFIN] = (SMP_VAL_FE_CON_ACC | SMP_VAL_FE_SES_ACC | SMP_VAL_FE_REQ_CNT | + SMP_VAL_FE_HRQ_HDR | SMP_VAL_FE_HRQ_BDY | SMP_VAL_FE_SET_BCK | + SMP_VAL_BE_REQ_CNT | SMP_VAL_BE_HRQ_HDR | SMP_VAL_BE_HRQ_BDY | + SMP_VAL_BE_SET_SRV | SMP_VAL_BE_SRV_CON | SMP_VAL_BE_RES_CNT | + SMP_VAL_BE_HRS_HDR | SMP_VAL_BE_HRS_BDY | SMP_VAL_BE_STO_RUL | + SMP_VAL_FE_RES_CNT | SMP_VAL_FE_HRS_HDR | SMP_VAL_FE_HRS_BDY | SMP_VAL_FE_LOG_END | SMP_VAL___________ | SMP_VAL___________ | SMP_VAL___________ ), };