Bug #97414 Router not working properly with --conf-use-gr-notifications
Submitted: 29 Oct 2019 12:14 Modified: 17 Mar 12:44
Reporter: Pedro Pinheiro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Router Severity:S2 (Serious)
Version:5.7.27, 5.7.28 OS:Any
Assigned to: CPU Architecture:Any

[29 Oct 2019 12:14] Pedro Pinheiro
Description:
Hi,
I am trying to use the router option conf-use-gr-notifications, so we don’t get flooded with queries from router asking for Group Replication status, but we found out it was not possible to use such option in 5.7.

How to repeat:
How to reproduce:
MySQL Router 8.0.17
MySQL Server 5.7.27

3 Node InnoDB Cluster
MySQLX Plugin Enabled on all nodes
Router bootstrap:
sudo mysqlrouter --bootstrap trudba @10.8.15.153 --user mysqlrouter  --conf-use-gr-notifications

Router Error log:
-------------
2019-10-28 18:38:51 routing INFO [7f1aeb1f1700] Routing routing:LabDbCluster2_default_x_ro listening on 64470 got request to disconnect invalid connections: metadata change
2019-10-28 18:38:51 routing INFO [7f1aeb1f1700] Routing routing:LabDbCluster2_default_x_rw listening on 64460 got request to disconnect invalid connections: metadata change
2019-10-28 18:38:51 routing INFO [7f1aeb1f1700] Routing routing:LabDbCluster2_default_ro listening on 6447 got request to disconnect invalid connections: metadata change
2019-10-28 18:38:51 routing INFO [7f1aeb1f1700] Routing routing:LabDbCluster2_default_rw listening on 6446 got request to disconnect invalid connections: metadata change
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Failed setting mysqlx_wait_timeout on connection to node 10.8.15.153:33060; (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Could not create notification connection to the node 10.8.15.153:33060. (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Failed setting mysqlx_wait_timeout on connection to node 10.8.15.154:33060; (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Could not create notification connection to the node 10.8.15.154:33060. (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Failed setting mysqlx_wait_timeout on connection to node 10.8.15.155:33060; (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
2019-10-28 18:38:51 metadata_cache WARNING [7f1aeb1f1700] Could not create notification connection to the node 10.8.15.155:33060. (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')

-------------

Looking at the error:
. (err_code=1193; err_msg='Unknown system variable 'mysqlx_wait_timeout'')
It seems this variable 'mysqlx_wait_timeout'' is not implemented in MySQLX pluging 5.7
Not mentioned in 5.7 documentation
https://dev.mysql.com/doc/refman/5.7/en/x-plugin-options-system-variables.html

But mentioned in 8.0
https://dev.mysql.com/doc/refman/8.0/en/x-plugin-options-system-variables.html

Also looking  the MySQL Variables:
show variables like '%mysqlx_w%';
Empty set (0.00 sec)
--------------------
As note, besides this missing system variable, the router still react to topology changes, as we can see in router log, , when we stop one of the MySQL Nodes
---
2019-10-29 12:02:29 metadata_cache WARNING [7f1aeb1f1700] Member 10.8.15.153:3306 (72d572ee-f9a7-11e9-9cc5-005056b408ab) defined in metadata not found in actual replicaset
---

Suggested fix:
MySQLX plugin 5.7 should implement the missing system variable 'mysqlx_wait_timeout''
So Router works properly with mysqlrouter  --conf-use-gr-notifications
[29 Oct 2019 13:11] Umesh Shastry
Dear Pedro,

Thank you for the report and feedback.

regards,
Umesh
[16 Mar 22:09] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Router 8.0.20 release, and here's the proposed changelog entry from the documentation team:

Group Replication notifications (use_gr_notifications) would log warnings
about a missing mysqlx_wait_timeout MySQL system variable when used
against MySQL 5.7 as this variable was added in MySQL 8.0. This warning is
no longer present.

Thank you for the bug report.
[17 Mar 12:44] Pedro Pinheiro
hi, just to clarify, this option can be used with MySQL 5.7?