{"action":"opened","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/1733","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/1733/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/1733/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/1733/events","html_url":"https://github.com/sysown/proxysql/issues/1733","id":369087797,"node_id":"MDU6SXNzdWUzNjkwODc3OTc=","number":1733,"title":"can't disable monitor for mysql_group_replication_hostgroups check when set the values of active belongs to  mysql_group_replication_hostgroups to 0","user":{"login":"winnie123456","id":25028947,"node_id":"MDQ6VXNlcjI1MDI4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/25028947?v=4","gravatar_id":"","url":"https://api.github.com/users/winnie123456","html_url":"https://github.com/winnie123456","followers_url":"https://api.github.com/users/winnie123456/followers","following_url":"https://api.github.com/users/winnie123456/following{/other_user}","gists_url":"https://api.github.com/users/winnie123456/gists{/gist_id}","starred_url":"https://api.github.com/users/winnie123456/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winnie123456/subscriptions","organizations_url":"https://api.github.com/users/winnie123456/orgs","repos_url":"https://api.github.com/users/winnie123456/repos","events_url":"https://api.github.com/users/winnie123456/events{/privacy}","received_events_url":"https://api.github.com/users/winnie123456/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-11T12:02:02Z","updated_at":"2018-10-11T12:02:02Z","closed_at":null,"author_association":"NONE","body":"[ ] The version of OS and ProxySQL\r\nproxysql 1.4.9 \r\n\r\n[ ] Every step to reproduce the issue\r\n（1）login in to proxysql 1.4.9 and check the mysql_server_group_replication_log\r\n\r\nAdmin> select * from mysql_server_group_replication_log;\r\n+-----------+------+------------------+-----------------+------------------+-----------+---------------------+--------------------------------------------------------------+\r\n| hostname  | port | time_start_us    | success_time_us | viable_candidate | read_only | transactions_behind | error                                                        |\r\n+-----------+------+------------------+-----------------+------------------+-----------+---------------------+--------------------------------------------------------------+\r\n| 127.0.0.1 | 3306 | 1539158379580687 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158384580771 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158389580845 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158394580958 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158399580995 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158404581108 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158409581176 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158414581220 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158419581321 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539158424581363 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n\r\n\r\n\r\n（2）set the values of active belongs to  mysql_group_replication_hostgroups to 0\r\n![image](https://user-images.githubusercontent.com/25028947/46801264-baecd980-cd8c-11e8-9626-4b7b03c217c9.png)\r\n\r\n（3）check the mysql_server_group_replication_log again and find the monitor still check the servers whick configed  in mysql_group_replication_hostgroups \r\nAdmin> select * from mysql_server_group_replication_log;\r\n+-----------+------+------------------+-----------------+------------------+-----------+---------------------+--------------------------------------------------------------+\r\n| hostname  | port | time_start_us    | success_time_us | viable_candidate | read_only | transactions_behind | error                                                        |\r\n+-----------+------+------------------+-----------------+------------------+-----------+---------------------+--------------------------------------------------------------+\r\n| 127.0.0.1 | 3306 | 1539258066849110 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539258071849183 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539258076849275 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539258081849419 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257586839946 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257591840029 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257596840129 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257601840294 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257606840335 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257611840425 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257616840513 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n| 127.0.0.1 | 3306 | 1539257621840591 | 0               | NO               | YES       | -1                  | Table 'sys.gr_member_routing_candidate_status' doesn't exist |\r\n\r\n（4）check the code and found the funciton called MySQL_HostGroups_Manager::generate_mysql_group_replication_hostgroups_table() don't check value of active when generate the data\r\n\tpthread_mutex_lock(&GloMyMon->group_replication_mutex);\r\n\t{\r\n\t\tchar *error = NULL;\r\n\t\tint cols = 0;\r\n\t\tint affected_rows = 0;\r\n\t\tSQLite3_result *resultset = NULL;\r\n\t\tchar *query = (char *)\"SELECT writer_hostgroup, hostname, port, MAX(use_ssl) use_ssl , writer_is_also_reader , max_transactions_behind FROM mysql_servers JOIN mysql_group_replication_hostgroups ON hostgroup_id=writer_hostgroup OR hostgroup_id=backup_writer_hostgroup OR hostgroup_id=reader_hostgroup OR hostgroup_id=offline_hostgroup WHERE status NOT IN (2,3) GROUP BY hostname, port\";\r\n\t\tmydb->execute_statement(query, &error, &cols, &affected_rows, &resultset);\r\n\t\tif (resultset)\r\n\t\t{\r\n\t\t\tif (GloMyMon->Group_Replication_Hosts_resultset)\r\n\t\t\t{\r\n\t\t\t\tdelete GloMyMon->Group_Replication_Hosts_resultset;\r\n\t\t\t}\r\n\t\t\tGloMyMon->Group_Replication_Hosts_resultset = resultset;\r\n\t\t}\r\n\t}\r\n\tpthread_mutex_unlock(&GloMyMon->group_replication_mutex);\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"winnie123456"}}