[MDEV-21157] --slave-info only contains gtid information of master and not binlog file and position with mariabackup Created: 2019-11-27 Updated: 2022-09-28 Resolved: 2020-11-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Affects Version/s: | 10.3.17 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Nilnandan Joshi | Assignee: | Vladislav Lesin |
| Resolution: | Incomplete | Votes: | 1 |
| Labels: | need_feedback | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
While taking a backup of slave server with --slave-info option, it only contains gtid As per the documentation, "Mariabackup does not check if GTIDs are being used in replication. It takes a shortcut and assumes that if the gtid_slave_pos system variable is non-empty, then it writes the CHANGE MASTER command with the MASTER_USE_GTID option set to slave_pos. Otherwise, it writes the CHANGE MASTER command with the MASTER_LOG_FILE and MASTER_LOG_POS options using the master's binary log file and position. See so as per the code, if it will get value for gtid_slave_pos system variable, it will only mention gtid and not master log file and position. But actually, both details should be mentioned like |
| Comments |
| Comment by Vladislav Lesin [ 2020-09-07 ] | |||||||||||
|
niljoshi, could you please clarify, what exactly xtrabackup_slave_info should contain from your perspective? It currently works exactly such as it is described in documentation. Do you want xtrtabackup_slave_info to contain both "CHANGE MASTER command with the MASTER_USE_GTID option", and "CHANGE MASTER command with the MASTER_LOG_FILE and MASTER_LOG_POS options" in the case when gtid_slave_pos is not empty? niljoshi Is this task a duplicate of I think, the correct answer on my question is in So, I mark this issue as a duplicate of | |||||||||||
| Comment by Nilnandan Joshi [ 2020-09-08 ] | |||||||||||
|
vlad.lesin Yes, currently it works exactly same as it is described in documentation. But I want that xtrabackup_slave_info should have CHANGE MASTER command with both GTID and MASTER_LOG_FILE/MASTER_LOG_POS information in any case. (either gtid_slave_pos is empty or not) Also, I think MDEV-19264 is different than this bug because there, it's still asking for alternate option between GTID and LOG_FILE/LOG_POS while I think that it should have both. | |||||||||||
| Comment by Vladislav Lesin [ 2020-09-08 ] | |||||||||||
|
niljoshi But your request conflicts with Could you please explain for what purpose we need to backup both gtid and master log file/position? GeoffMontee, as this request conflicts with your request, could you please share your opinion about this? | |||||||||||
| Comment by Vladislav Lesin [ 2020-09-08 ] | |||||||||||
|
Geoff's feedback:
but in this case, would the slave actually use the binlog file/position, or would it use GTID? it is ambiguous to specify both a binlog file/position and a GTID in a CHANGE MASTER command. it sounds to me like implementing
but i don't know how useful this would be. imo, it would probably be more desirable for most users for us to implement | |||||||||||
| Comment by Nilnandan Joshi [ 2020-09-09 ] | |||||||||||
|
vlad.lesin For | |||||||||||
| Comment by Vladislav Lesin [ 2020-09-09 ] | |||||||||||
|
niljoshi What exactly problem the customer wanted to solve with such solution? I understand What if "Using_Gtid" column in SHOW SLAVE STATUS is "no", but gtid_slave_pos is not empty? If we implement What if some people use their own custom scripts to restore slaves, and such scripts just execute the content of xtrabackup_slave_info file. Will they execute both statements? Could you please ask the customer, why does he need both CHANGE MASTER statements in backup? Could you please also ask him, if | |||||||||||
| Comment by Vladislav Lesin [ 2020-09-14 ] | |||||||||||
|
I have just pushed | |||||||||||
| Comment by Claudio Nanni [ 2022-09-28 ] | |||||||||||
|
vlad.lesin "But I don't understand why do we need to backup both statements unconditionally." |