mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
MINOR: counters: document that tg shared counters are tied to shm-stats-file mapping
Let's explicitly mention that fe_counters_shared_tg and be_counters_shared_tg structs are embedded in shm_stats_file_object struct so any change in those structs will result in shm stats file incompatibility between processes, thus extra precaution must be taken when making changes to them. Note that the provisionning made in shm_stats_file_object struct could be used to add members to {fe,be}_counters_shared_tg without changing shm_stats_file_object struct size if needed in order to preserve shm stats file version.
This commit is contained in:
parent
31b3be7aae
commit
644b6b9925
@ -33,6 +33,11 @@
|
|||||||
struct { \
|
struct { \
|
||||||
uint16_t flags; /* COUNTERS_SHARED_F flags */\
|
uint16_t flags; /* COUNTERS_SHARED_F flags */\
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* /!\ any change performed here will impact shm-stats-file mapping because the
|
||||||
|
* struct is embedded in shm_stats_file_object struct, so proceed with caution
|
||||||
|
* and change shm stats file version if needed
|
||||||
|
*/
|
||||||
#define COUNTERS_SHARED_TG \
|
#define COUNTERS_SHARED_TG \
|
||||||
struct { \
|
struct { \
|
||||||
unsigned long last_state_change; /* last time, when the state was changed */\
|
unsigned long last_state_change; /* last time, when the state was changed */\
|
||||||
@ -60,7 +65,11 @@ struct counters_shared {
|
|||||||
} *tg[MAX_TGROUPS];
|
} *tg[MAX_TGROUPS];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* counters used by listeners and frontends */
|
/*
|
||||||
|
* /!\ any change performed here will impact shm-stats-file mapping because the
|
||||||
|
* struct is embedded in shm_stats_file_object struct, so proceed with caution
|
||||||
|
* and change shm stats file version if needed
|
||||||
|
*/
|
||||||
struct fe_counters_shared_tg {
|
struct fe_counters_shared_tg {
|
||||||
COUNTERS_SHARED_TG;
|
COUNTERS_SHARED_TG;
|
||||||
|
|
||||||
@ -91,6 +100,7 @@ struct fe_counters_shared {
|
|||||||
struct fe_counters_shared_tg *tg[MAX_TGROUPS];
|
struct fe_counters_shared_tg *tg[MAX_TGROUPS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* counters used by listeners and frontends */
|
||||||
struct fe_counters {
|
struct fe_counters {
|
||||||
struct fe_counters_shared shared; /* shared counters */
|
struct fe_counters_shared shared; /* shared counters */
|
||||||
unsigned int conn_max; /* max # of active sessions */
|
unsigned int conn_max; /* max # of active sessions */
|
||||||
@ -108,6 +118,10 @@ struct fe_counters {
|
|||||||
} p; /* protocol-specific stats */
|
} p; /* protocol-specific stats */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* /!\ any change performed here will impact shm-stats-file mapping because the
|
||||||
|
* struct is embedded in shm_stats_file_object struct, so proceed with caution
|
||||||
|
* and change shm stats file version if needed
|
||||||
|
*/
|
||||||
struct be_counters_shared_tg {
|
struct be_counters_shared_tg {
|
||||||
COUNTERS_SHARED_TG;
|
COUNTERS_SHARED_TG;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user