BUG/MEDIUM: log: issue mixing sampled to not sampled log servers.
authorEmeric Brun <ebrun@haproxy.com>
Fri, 10 Jul 2020 13:47:11 +0000 (15:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Jul 2020 15:50:12 +0000 (17:50 +0200)
commit2f4cc28e0f1c8c3deca8b1b7fa446c6523dcc93c
tree3e918d9c2910ea2ff0b7bcb3a60e82c935dcfccb
parentdc2ac81c41b2628ea1f37a915d377dc51e922e16
BUG/MEDIUM: log: issue mixing sampled to not sampled log servers.

A boolean was mistakenly declared 'static THREAD_LOCAL' causing
the probe of a log to a 'not sampled' log server conditionned by
the last evaluated 'sampled log' server test on the same thread.

This results to unpredictable drops of logs on 'not sampled'
log servers as soon a 'sampled' log server is declared.

This patch removes the static THREAD_LOCAL attribute from this
boolean, fixing the issue and allowing to mix 'sampled' and
'not sampled' servers.

This fix should be backported in any branches which includes
the log sampling feature.
src/log.c