proxy_info("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u. Own version: %llu, epoch: %llu. Proceeding with remote sync\n",hostname,port,v->version,v->epoch,v->diff_check,own_version,own_epoch);
// v->checksum will be destroyed when calling pull_proxysql_servers_from_peer()
proxy_error("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u, checksum %s. Own version: %llu, epoch: %llu, checksum %s. Sync conflict, epoch times are EQUAL, can't determine which server holds the latest config, we won't sync. This message will be repeated every %llu checks until LOAD MYSQL SERVERS TO RUNTIME is executed on candidate master.\n",hostname,port,v->version,v->epoch,v->diff_check,v->checksum,own_version,own_epoch,own_checksum,(diff_ps*10));
proxy_warning("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u. Own version: %llu, epoch: %llu. diff_check is increasing, but version 1 doesn't allow sync. This message will be repeated every %llu checks until LOAD PROXYSQL SERVERS TO RUNTIME is executed on candidate master.\n",hostname,port,v->version,v->epoch,v->diff_check,own_version,own_epoch,(diff_ps*10));
// NOTE: Backup values: 'v' gets invalidated by 'pull_proxysql_servers_from_peer()'
unsignedlonglongv_epoch=v->epoch;
unsignedlonglongv_version=v->version;
unsignedintv_diff_check=v->diff_check;
char*v_exp_checksum=strdup(v->checksum);
if(
(own_version==1)// we just booted
||
(v->epoch>own_epoch)// epoch is newer
){
if(v->diff_check>=diff_ps){
proxy_info("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u. Own version: %llu, epoch: %llu. Proceeding with remote sync\n",hostname,port,v->version,v->epoch,v->diff_check,own_version,own_epoch);
proxy_error("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u, checksum %s. Own version: %llu, epoch: %llu, checksum %s. Sync conflict, epoch times are EQUAL, can't determine which server holds the latest config, we won't sync. This message will be repeated every %llu checks until LOAD MYSQL SERVERS TO RUNTIME is executed on candidate master.\n",hostname,port,v_version,v_epoch,v_diff_check,v_exp_checksum,own_version,own_epoch,own_checksum,(diff_ps*10));
proxy_warning("Cluster: detected a peer %s:%d with proxysql_servers version %llu, epoch %llu, diff_check %u. Own version: %llu, epoch: %llu. diff_check is increasing, but version 1 doesn't allow sync. This message will be repeated every %llu checks until LOAD PROXYSQL SERVERS TO RUNTIME is executed on candidate master.\n",hostname,port,v->version,v->epoch,v->diff_check,own_version,own_epoch,(diff_ps*10));