Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
linux
Description
1. sql\wsrep_mysqld.cc
void wsrep_init_globals()
{
wsrep_gtid_server.domain_id= wsrep_gtid_domain_id;
wsrep_init_sidno(Wsrep_server_state::instance().connected_gtid().id());
wsrep_init_gtid();
......
void wsrep_init_gtid()
{
wsrep_server_gtid_t stored_gtid= wsrep_get_SE_checkpoint<wsrep_server_gtid_t>();
if (stored_gtid.server_id == 0)
{
rpl_gtid wsrep_last_gtid;
stored_gtid.domain_id= wsrep_gtid_server.domain_id;
if (mysql_bin_log.is_open() &&
mysql_bin_log.lookup_domain_in_binlog_state(stored_gtid.domain_id,
&wsrep_last_gtid))
else
{ stored_gtid.server_id= global_system_variables.server_id; stored_gtid.seqno= 0; } }
wsrep_gtid_server.gtid(stored_gtid);
}
2. sql\wsrep_xid.cc
template<>
wsrep_server_gtid_t wsrep_get_SE_checkpoint()
{
XID xid;
wsrep_server_gtid_t gtid=
;
if (!wsrep_get_SE_checkpoint_common(xid))
{ return gtid; }if (xid.data[WSREP_XID_VERSION_OFFSET] == WSREP_XID_VERSION_3)
{ memcpy(>id, &xid.data[WSREP_XID_RPL_GTID_OFFSET], sizeof(wsrep_server_gtid_t)); } return gtid;
}
3. In function wsrep_get_SE_checkpoint, domain_id and server_id were from engine, and were set to gtid.
In function wsrep_init_gtid , stored_gtid.server_id was not equal to 0. But domain_id and server_id in mariadb.cnf were not same as stored_id.
4. Backup data from cluster1 with mariabackup, and then restore data to cluster2. So the GTID domain_id and server_id become same.
GTID : <domain_id> - <server_id> - <seqno>
Attachments
Issue Links
- relates to
-
MDEV-26223 Galera cluster node consider old server_id value even after modification of server_id [wsrep_gtid_mode=ON]
- Closed