BUG/MINOR: state-file: do not store duplicates in the global tree
authorWilly Tarreau <w@1wt.eu>
Fri, 20 Dec 2019 16:23:40 +0000 (17:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Dec 2019 16:35:34 +0000 (17:35 +0100)
commit659d3b75b6f0f2908b0eaf78777579d47992d4dd
tree39418cf3a66ac249fa5bf725e6e21c5b87b22b49
parente15cf47c00df06c3a37da4ff5dfc84732f174bb3
BUG/MINOR: state-file: do not store duplicates in the global tree

The global state file tree isn't configured for unique keys, so if an
entry appears multiple times, e.g. due to a bogus script that concatenates
entries multiple times, this will needlessly eat memory. Let's just drop
duplicates.

This should be backported to 2.1.

(cherry picked from commit fd1aa01f72d98760ae8c1bfbfc66351875df3380)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/server.c