From 664fba97d4a7bdb83acc06ccf64646ccfedc7752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Tue, 11 Jul 2023 18:37:10 +0200 Subject: [PATCH] Improve doc for 'pull_mysql_servers_v2_from_peer' --- lib/ProxySQL_Cluster.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ProxySQL_Cluster.cpp b/lib/ProxySQL_Cluster.cpp index 71a033e46..221031cb2 100644 --- a/lib/ProxySQL_Cluster.cpp +++ b/lib/ProxySQL_Cluster.cpp @@ -1884,6 +1884,11 @@ __exit_pull_mysql_servers_from_peer: * fetching of different tables (mysql_servers vs mysql_servers_v2) and computing of checksum. In the previous version, * the checksum for "mysql_servers" was computed and added to the checksums of other dependent modules. In contrast, the new version * calculates the checksum for "mysql_servers_v2" and combines it with the checksums of other dependent modules. + * + * IMPORTANT: This function performs both the fetching of config, and conditionally the 'runtime_mysql_servers', in + * order to avoid extra transitory states and checksums that would result if this operation was performed in multiple + * steps. When required by the sync algorithm ('mysql_servers_sync_algorithm'), these two fetches and configuration + * promotion should be performed in a single 'atomic' operation. * * @param peer_mysql_server_v2 checksum and epoch of mysql_servers_v2 from remote peer * @param peer_runtime_mysql_server checksum and epoch of mysql_servers from remote peer