]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: log: remove the unused curr_idx in struct smp_log_range
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Sep 2023 18:09:58 +0000 (20:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Sep 2023 19:38:33 +0000 (21:38 +0200)
commit3f1284560fce0012cc0d3eadbd458262f7fc1f82
treec759e61f292d6c9ac96327cb73fdcba1c25c05a2
parent4351364700fb704f57e9787ea14a91a03f5c6262
MINOR: log: remove the unused curr_idx in struct smp_log_range

This index is useless because it only serves to know when the global
index reached the end, while the global one already knows it. Let's
just drop it and perform the test on the global range.

It was verified with the following config that the first server continues
to take 1/10 of the traffic, the 2nd one 2/10, the 3rd one 3/10 and the
4th one 4/10:

    log 127.0.0.1:10001 sample 1:10 local0
    log 127.0.0.1:10002 sample 2,5:10 local0
    log 127.0.0.1:10003 sample 3,7,9:10 local0
    log 127.0.0.1:10004 sample 4,6,8,10:10 local0
include/haproxy/log-t.h
src/log.c