Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2022-05-06 10:27:04 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2022-05-06 10:27:04 +0300
commit088a448c5c499baf25f07533b8f99f22f5e5449c (patch)
tree5b937ec0a91f19ae62f9f43b51582e8f936b0485 /src
parentafdaacd70e99a849bdf7c4cf3e91d89cbc1d140a (diff)
........S. [ZBX-20918] moved final history/trends cache sync in main process before stopping HA manager
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_server/server.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c
index b09765a596c..85eea5ce8ae 100644
--- a/src/zabbix_server/server.c
+++ b/src/zabbix_server/server.c
@@ -1893,6 +1893,13 @@ void zbx_on_exit(int ret)
zbx_locks_disable();
#endif
+ if (ZBX_NODE_STATUS_ACTIVE == ha_status)
+ {
+ DBconnect(ZBX_DB_CONNECT_EXIT);
+ free_database_cache(ZBX_SYNC_ALL);
+ DBclose();
+ }
+
if (SUCCEED != zbx_ha_stop(&error))
{
zabbix_log(LOG_LEVEL_CRIT, "cannot stop HA manager: %s", error);
@@ -1904,13 +1911,6 @@ void zbx_on_exit(int ret)
{
free_metrics();
zbx_ipc_service_free_env();
-
- DBconnect(ZBX_DB_CONNECT_EXIT);
-
- free_database_cache(ZBX_SYNC_ALL);
-
- DBclose();
-
free_configuration_cache();
/* free history value cache */