[MXS-3174] read gtid_current_position Created: 2020-09-11  Updated: 2020-09-11  Resolved: 2020-09-11

Status: Closed
Project: MariaDB MaxScale
Component/s: maxadmin
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: febriyant Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: GTID, api, maxscale
Environment:

Centos 7



 Description   

currently i have 3 node with replication GTID

  • server-168 (Master)
  • server-99 (Slave)
  • server-98 (Slave)

on api maxscale (v1/monitors) we got gtid_current_post at
server-99 = 0-99-60302135,1-168-25979059
and on server-168 = 0-99-60302111,1-168-25979059

my question is whats the paramater is real as gtid_position because we see the different gtid_current_position from maxscale api ?

and i check slave status on server-99 we got
Gtid_IO_Pos: 1-168-25979797,0-99-60302111

this is wrong i read or information from maxscale is wrong ?
thanks



 Comments   
Comment by markus makela [ 2020-09-11 ]

Gtid_IO_Pos is the latest replicated GTID position and gtid_current_pos is the highest GTID position on the current server (replicated from elsewhere or generated on the server itself). You can use this query to check the GTID position on a server:

SELECT @@gtid_current_pos;

Comment by febriyant [ 2020-09-11 ]

so when i get valid gtid from maxscale API is gtid_io_pos
from section slave_connections:

{
                        "name": "Dbregis_99_nbc",
                        "server_id": 99,
                        "read_only": false,
                        "gtid_current_pos": "0-99-60302135,1-168-25979059",
                        "gtid_binlog_pos": "0-99-60302135,1-168-25979059",
                        "master_group": null,
                        "slave_connections": [
                            {
                                "connection_name": "",
                                "master_host": "172.17.70.186",
                                "master_port": 13314,
                                "slave_io_running": "Yes",
                                "slave_sql_running": "Yes",
                                "seconds_behind_master": 0,
                                "master_server_id": 168,
                                "last_io_or_sql_error": "",
                                "gtid_io_pos": "0-99-60302111,1-168-25979059"
                            }
                        ]
                    },

Comment by markus makela [ 2020-09-11 ]

The values returned from the REST API are the values returned by the following queries:

SHOW SLAVE STATUS;
SELECT  @@gtid_current_pos, @@gtid_binlog_pos;

They are updated once every monitor_interval.

Generated at Thu Feb 08 04:19:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.