]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: proxy: fix stick table expired entries cleanup on stopping
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 2 Nov 2026 13:34:42 +0000 (14:34 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 2 Nov 2026 13:58:15 +0000 (14:58 +0100)
commit5d870741a8c59b83ca033d787d3198dd286fbe65
tree15666d1c971cf29c3c9ad77aa79520f44f0aa3bb
parent6a5de2fdcec21a5fce521319fbab2ea07cdfef20
BUG/MEDIUM: proxy: fix stick table expired entries cleanup on stopping

Since the following patch, proxy internal management task is only
created for frontends or if a stick-table is present. This notably
serves to purge expired entries from tables on soft-stop.

  a4a17eb36698c927de1c3171236fcc5a6997721a
  OPTIM/MINOR: proxy: do not init proxy management task if unused

However, the condition was incorrectly written, as it is never true for
the stick-table case. This is because table's <current> member is always
zero at parse time as the stick-table is still empty. Thus, the task is
not allocated for backends even if stick-table is declared. This results
in worker processes potentially leaving expired entries in stick-tables.

The error originates from reusing the condition from manage_proxy(),
which performs the stick-table cleanup. In this context it makes sense
to check <current> value.

Fix the condition to ensure the task is allocated when a stick-table is
declared. Checking the proxy's <table> member is sufficient for that.

This fixes github issue #3554.

This must be backported up to 3.4.
src/cfgparse.c