[MDEV-18404] Setting gtid_binlog_state with non-local server_id does not update gtid_current_pos Created: 2019-01-28 Updated: 2019-10-25 Resolved: 2019-07-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Replication |
| Affects Version/s: | 10.1.37, 10.2.21, 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Andrei Elkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | gtid | ||
| Issue Links: |
|
||||||||
| Description |
|
Currently, gtid_binlog_pos can be manually updated by changing gtid_binlog_state. https://mariadb.com/kb/en/library/gtid/#gtid_binlog_state Since gtid_current_pos is a union of gtid_binlog_pos and gtid_slave_pos, this also updates gtid_current_pos. For example:
However, there seems to be a bug where gtid_current_pos is not updated if gtid_binlog_state is updated with GTIDs that contain non-local server_id values. Compare the above behavior to the following:
I think that if an update to gtid_binlog_state causes gtid_binlog_pos to be updated, then gtid_current_pos should also be updated--even if the GTIDs didn't contain the local server_id. |
| Comments |
| Comment by Kristian Nielsen [ 2019-07-15 ] | ||||||||||
|
No, this is wrong. See the documentation of @@gtid_current_pos: https://mariadb.com/kb/en/library/gtid/#gtid_current_pos gtid_current_pos is documented to only take from the binlog position those GTIDs with the server's own server_id. If you want GTIDs from a different server to affect the slave position, just update the gtid_slave_pos at the same time as updating gtid_binlog_state. | ||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-07-15 ] | ||||||||||
|
Hi knielsen,
To be specific, it says this:
Based on this, it wasn't entirely clear what gtid_current_pos would contain for a given domain if gtid_binlog_pos contained a GTID from a different server for that domain, and if gtid_slave_pos contained no GTID for that domain. I assumed that gtid_current_pos would use the GTID from gtid_binlog_pos for that domain. I just did a test, and I can see that gtid_current_pos actually does not use any GTID for that domain. For example:
So I've clarified the documentation by adding this:
| ||||||||||
| Comment by Andrei Elkin [ 2019-07-16 ] | ||||||||||
|
Fixed with improving documentation https://mariadb.com/kb/en/library/gtid/#gtid_current_pos. GeoffMontee, thanks. |