]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stats-file: processes share the same clock source from shm-stats-file
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 27 Aug 2025 14:14:53 +0000 (16:14 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 3 Sep 2025 13:59:27 +0000 (15:59 +0200)
commit443e657fd60768791ef35eff0d669c0a1d399780
treebc73d640bcce2fabdaeb31a8c52bf013b094b253
parentc91d93ed1c03d2b50d65c83de3d2d9b87657de08
MEDIUM: stats-file: processes share the same clock source from shm-stats-file

The use of the "shm-stats-file" directive now implies that all processes
using the same file now share a common clock source, this is required
for consistency regarding time-related operations.

The clock source is stored in the shm stats file header.
When the directive is set, all processes share the same clock
(global_now_ms and global_now_ns both point to variables in the map),
this is required for time-based counters such as freq counters to work
consistently. Since all processes manipulate global clock with atomic
operations exclusively during runtime, and don't systematically relies
on it (thanks to local now_ms and now_ns), it is pretty much transparent.
include/haproxy/stats-file-t.h
src/stats-file.c