You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PROXYSQL40: runtime_only discovered servers are wiped by LOAD MYSQL SERVERS TO RUNTIME and persisted by Cluster runtime pulls #6523
Desired sets posted with ProxySQL_ServerPersistence::runtime_only live only in the Hostgroups Manager.
Any LOAD MYSQL SERVERS TO RUNTIME rebuilds runtime from main.mysql_servers and drops them. The delegated hostgroups stay empty until the discovery controller posts again.
Under the default Cluster sync algorithm, the opposite also happens: a peer adopts another node's discovered rows and, with cluster_mysql_servers_save_to_disk, persists them as operator rows.
lib/ProxySQL_Admin.cpp:8489: runtime_only makes materialization return early, so nothing reaches main.mysql_servers.
lib/ProxySQL_Admin.cpp:9170: LOAD rebuilds runtime from main.mysql_servers only, and publishes after commit (:9367).
lib/ProxySQL_Cluster.cpp:2057-2106: the runtime pull (sync algorithm 1, the default) adopts the peer's runtime_mysql_servers, including the peer's discovered rows. With save_to_disk, save_mysql_servers_runtime_to_database(false) writes them into main.mysql_servers and to disk.
Reproduction
A server-discovery plugin posts a runtime_only set for hostgroups 10/11.
Run LOAD MYSQL SERVERS TO RUNTIME.
Hostgroups 10/11 are empty until the controller's next successful post. If its external source is failing (for example the AWS API is throttling or credentials expired), they stay empty until it recovers.
Impact
Every LOAD opens a window with no backends for the delegated hostgroups. The window is unbounded while the source is down.
In a Cluster with the default algorithm, one node's discovered rows become persisted rows on its peers. Later LOADs re-insert them, including instances that no longer exist.
Suggested direction
Keep the last applied runtime_only desired set of currently delegated hostgroups across LOAD and Cluster pulls (merge it into the rebuilt runtime).
Exclude delegated hostgroups from runtime-pull persistence, or document that save_to_disk persists them.
Found while testing the ProxySQL AWS plugin (managed discovery, runtime_only persistence).
Activity