Skip to content

Commit

Permalink
Fixing offset in cluster results
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Feb 19, 2024
1 parent da039d1 commit 0e0db46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ProxySQL_Cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,15 +2052,15 @@ void ProxySQL_Cluster::pull_mysql_servers_v2_from_peer(const mysql_servers_v2_ch
}

if (fetching_error == false) {
const uint64_t servers_hash = compute_servers_tables_raw_checksum(results, 6); // ignore runtime_mysql_servers in checksum calculation
const uint64_t servers_hash = compute_servers_tables_raw_checksum(results, 7); // ignore runtime_mysql_servers in checksum calculation
const string computed_checksum{ get_checksum_from_hash(servers_hash) };
proxy_debug(PROXY_DEBUG_CLUSTER, 5, "Computed checksum for MySQL Servers v2 from peer %s:%d : %s\n", hostname, port, computed_checksum.c_str());
proxy_info("Cluster: Computed checksum for MySQL Servers v2 from peer %s:%d : %s\n", hostname, port, computed_checksum.c_str());

bool runtime_checksum_matches = true;

if (results[6]) {
const uint64_t runtime_mysql_server_hash = mysql_raw_checksum(results[6]);
if (results[7]) {
const uint64_t runtime_mysql_server_hash = mysql_raw_checksum(results[7]);
const std::string runtime_mysql_server_computed_checksum = get_checksum_from_hash(runtime_mysql_server_hash);
proxy_debug(PROXY_DEBUG_CLUSTER, 5, "Computed checksum for MySQL Servers from peer %s:%d : %s\n", hostname, port, runtime_mysql_server_computed_checksum.c_str());
proxy_info("Cluster: Computed checksum for MySQL Servers from peer %s:%d : %s\n", hostname, port, runtime_mysql_server_computed_checksum.c_str());
Expand Down

0 comments on commit 0e0db46

Please sign in to comment.