From a93da77616076913f9841a4f8701087a0e138f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Sun, 23 Apr 2023 23:16:51 +0200 Subject: [PATCH] Fix outdated comment for '__reset_rules' function --- lib/Query_Processor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Query_Processor.cpp b/lib/Query_Processor.cpp index b41cad136..7826fa30a 100644 --- a/lib/Query_Processor.cpp +++ b/lib/Query_Processor.cpp @@ -429,8 +429,13 @@ static void __delete_query_rule(QP_rule_t *qr) { }; // delete all the query rules in a Query Processor Table -// Note that this function is called by GloQPro with &rules (generic table) -// and is called by each mysql thread with _thr_SQP_rules (per thread table) +// Note that this function is called by: +// - GloQPro with &rules (generic table). In Query_Processor destrutor. +// - Each mysql thread with _thr_SQP_rules (per thread table). During destruction or rules recreation. +// - ProxySQL_Admin at 'load_mysql_variables_to_runtime', during global rules recreation. For this case, the +// function is used outside the 'Query_Processor' due to flow present in 'load_mysql_variables_to_runtime' +// of freeing the previous resources associated to the 'query_rules' and 'query_rules_fast_routing' out of +// the 'Query_Processor' general locking ('wrlock'). void __reset_rules(std::vector * qrs) { proxy_debug(PROXY_DEBUG_MYSQL_QUERY_PROCESSOR, 5, "Resetting rules in Query Processor Table %p\n", qrs); if (qrs==NULL) return;