MINOR: log: Enable the log sampling and load-balancing feature.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 25 Apr 2019 05:42:09 +0000 (07:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2019 07:25:09 +0000 (09:25 +0200)
commitd803e475e58506eae56c6844c416e456dcbd5746
tree8a49971d1d76d4bb1cde83070d570f76992b63dc
parentd95ea2897eb951c72fd169f36b6a79905f2ed999
MINOR: log: Enable the log sampling and load-balancing feature.

This patch implements the sampling and load-balancing of log servers configured
with "sample" new keyword implemented by this commit:
    'MINOR: log: Add "sample" new keyword to "log" lines'.
As the list of ranges used to sample the log to balance is ordered, we only
have to maintain ->curr_idx member of smp_info struct which is the index of
the sample and check if it belongs or not to the current range to decide if we
must send it to the log server or not.
include/common/hathreads.h
include/proto/log.h
include/types/log.h
src/log.c