]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream: rename "txn.redispatch" to "txn.redispatched"
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 6 Feb 2024 16:42:21 +0000 (17:42 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 8 Feb 2024 08:39:14 +0000 (09:39 +0100)
The fetch will return true if the stream was redispatched: this is a
past action, thus we rename the fetch to better reflect its true
meaning and prevent confusions.

Documentation was updated.
While at it, the fetch was moved from internal states section to Layer 4
section, which is where it belongs.

No backport needed unless 92b2edb (" MINOR: stream: add "txn.redispatch"
fetch") gets backported.

doc/configuration.txt
src/stream.c

index 40b0c58f9d12ec5c8afe0458f136326b9079bfac..f6ee5546158922af68b7536671b713a21ee989e2 100644 (file)
@@ -20514,7 +20514,6 @@ table_avl([<table>])                               integer
 table_cnt([<table>])                               integer
 thread                                             integer
 txn.id32                                           integer
-txn.redispatch                                     boolean
 txn.sess_term_state                                string
 uuid([<version>])                                  string
 var(<var-name>[,<default>])                        undefined
@@ -20971,12 +20970,6 @@ txn.id32 : integer
   depends on the request rate. In practice, it should not be an issue. For a
   true unique ID, see "unique-id-format" directive.
 
-txn.redispatch : boolean
-  Returns true if the connection has experienced redispatch upon retry according
-  to "option redispatch" configuration. This value is subject to change while
-  the connection is not fully established. For HTTP connections, the value may
-  be affected by L7 retries.
-
 txn.sess_term_state : string
   Returns the TCP or HTTP stream termination state, as reported in the log. It
   is a 2-characters string, The final stream state followed by the event which
@@ -21231,6 +21224,7 @@ src_updt_conn_cnt([<table>])                       integer
 srv_id                                             integer
 srv_name                                           string
 txn.conn_retries                                   integer
+txn.redispatched                                   boolean
 -------------------------------------------------+-------------
 
 Detailed list:
@@ -22265,6 +22259,12 @@ txn.conn_retries : integer
   connection is not fully established. For HTTP connections, the value may be
   affected by L7 retries.
 
+txn.redispatched : boolean
+  Returns true if the connection has experienced redispatch upon retry according
+  to "option redispatch" configuration. This value is subject to change while
+  the connection is not fully established. For HTTP connections, the value may
+  be affected by L7 retries.
+
 7.3.4. Fetching samples at Layer 5
 ----------------------------------
 
@@ -25439,7 +25439,7 @@ Please refer to the table below for currently defined variables :
   | H | %r   | http_request                                         | string  |
   +---+------+------------------------------------------------------+---------+
   |   | %rc  | retries                                              | numeric |
-  |   |      | %[txn.redispatch,iif(+,)]%[txn.conn_retries]         |         |
+  |   |      | %[txn.redispatched,iif(+,)]%[txn.conn_retries]       |         |
   +---+------+------------------------------------------------------+---------+
   |   | %rt  | request_counter (HTTP req or TCP session)            | numeric |
   |   |      | %[txn.id32]                                          |         |
index 39b374639842f80c88a3622c61dd3fb4c9b2c205..54c70ecba9968e9f4e0df4bfcfd0033ac6c93639 100644 (file)
@@ -4020,7 +4020,7 @@ static int smp_fetch_id32(const struct arg *args, struct sample *smp, const char
        return 1;
 }
 
-static int smp_fetch_redispatch(const struct arg *args, struct sample *smp, const char *km, void *private)
+static int smp_fetch_redispatched(const struct arg *args, struct sample *smp, const char *km, void *private)
 {
        smp->flags = SMP_F_VOL_TXN;
        smp->data.type = SMP_T_BOOL;
@@ -4044,7 +4044,7 @@ static struct sample_fetch_kw_list smp_kws = {ILH, {
        { "last_rule_line",     smp_fetch_last_rule_line,     0, NULL, SMP_T_SINT, SMP_USE_INTRN, },
        { "txn.conn_retries",   smp_fetch_conn_retries,       0, NULL, SMP_T_SINT, SMP_USE_L4SRV, },
        { "txn.id32",           smp_fetch_id32,               0, NULL, SMP_T_SINT, SMP_USE_INTRN, },
-       { "txn.redispatch",     smp_fetch_redispatch,         0, NULL, SMP_T_BOOL, SMP_USE_L4SRV, },
+       { "txn.redispatched",   smp_fetch_redispatched,       0, NULL, SMP_T_BOOL, SMP_USE_L4SRV, },
        { "txn.sess_term_state",smp_fetch_sess_term_state,    0, NULL, SMP_T_STR,  SMP_USE_INTRN, },
        { NULL, NULL, 0, 0, 0 },
 }};