Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.2
-
None
Description
gtid_domain_id has both a session value and global value. Generally we are interested in the global value. The query in read_server_variables(), however, only checks the session value (SELECT @@gtid_domain_id). This does not update with the global value as long as the session is alive, meaning the monitor will follow the wrong gtid domain id.
Upon closer inspection, the gtid_domain_id is quite a problematic value, as it seems changing the global version does not change the value for existing sessions. This means that if any old sessions keep doing writes, those writes will go to the old domain. In the worst case, there could be multiple domains being updated simultaneously, making it impossible to say which is the current domain. This has implications for checking if a server is behind another server in gtid:s.