From 6df10d080275f855717f6b8ed275d97a2a7c134b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 20 Apr 2026 18:34:35 +0200 Subject: [PATCH] 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). --- src/sample.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) 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___________ ), };