-
Problem report
-
Resolution: Unresolved
-
Major
-
7.0.9rc1, 7.2.2, 7.4.0alpha1 (master)
-
None
-
S25-W4/5
Every time history is pushed into elastic there is new connection established.
Expected:
Connection should be reused for better performance by not closing multi handle, here are required changes:
diff --git a/src/libs/zbxhistory/history_elastic.c b/src/libs/zbxhistory/history_elastic.c index 3be0e7ab2ef..e95234e61a2 100644 --- a/src/libs/zbxhistory/history_elastic.c +++ b/src/libs/zbxhistory/history_elastic.c @@ -358,12 +358,12 @@ static void elastic_writer_release(void) for (i = 0; i < writer.ifaces.values_num; i++) elastic_close((zbx_history_iface_t *)writer.ifaces.values[i]); - curl_multi_cleanup(writer.handle); - writer.handle = NULL; + //curl_multi_cleanup(writer.handle); + //writer.handle = NULL; - zbx_vector_ptr_destroy(&writer.ifaces); + zbx_vector_ptr_clear(&writer.ifaces); - writer.initialized = 0; + //writer.initialized = 0; }