Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while resuming with GTID #64

Open
antonprogz opened this issue Jun 10, 2020 · 7 comments
Open

Error while resuming with GTID #64

antonprogz opened this issue Jun 10, 2020 · 7 comments
Assignees

Comments

@antonprogz
Copy link

antonprogz commented Jun 10, 2020

  • Operating System: Linux
  • PHP Version: 7.2
  • php-mysql-replication Version: <v6.0.0>
  • *mysql version 5.7.30 >

Steps required to reproduce the problem.

  1. Start replication with an executed gtid set provided using ConfigBuilder::withGtid($gtid_set). You should use an actual gtid set from your mysql master.

Expected Result.

  • Replication started from $gtid_set.

Actual Result.

  • Replication did not start. The following message appeared in the log:

The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID sets and the missing purged transactions are too long to print in this message. For more information, please see the master's error log or the manual for GTID_SUBTRACT.

I've checked master's binlog, it contains required gtid_set.

@krowinski krowinski self-assigned this Jun 10, 2020
@krowinski
Copy link
Owner

hi

can you check

select @@GLOBAL.gtid_executed, @@GLOBAL.gtid_purged

Are you sure that this logs where not purged on master as this message shows ?

I will try to replicate this later but this is first what comes to my mind.

@antonprogz
Copy link
Author

The query

select @@GLOBAL.gtid_executed, @@GLOBAL.gtid_purged\G

resulted with:

*************************** 1. row ***************************
@@GLOBAL.gtid_executed: 4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,
88fe7c40-5829-11ea-a714-525400d38027:1-3116017
  @@GLOBAL.gtid_purged: 4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,
88fe7c40-5829-11ea-a714-525400d38027:1-2808255
1 row in set (0.00 sec)

The gtid set value passed to the library:

4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,88fe7c40-5829-11ea-a714-525400d38027:1-3116017

@krowinski
Copy link
Owner

krowinski commented Jun 18, 2020

ok what shows you

show master status

?

column Executed_Gtid_Set

@antonprogz
Copy link
Author

antonprogz commented Jun 24, 2020

The gtid set value passed to the library:

4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,88fe7c40-5829-11ea-a714-525400d38027:1-3418495
mysql> select @@GLOBAL.gtid_executed, @@GLOBAL.gtid_purged\G
*************************** 1. row ***************************
@@GLOBAL.gtid_executed: 4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,
88fe7c40-5829-11ea-a714-525400d38027:1-3418495
  @@GLOBAL.gtid_purged: 4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,
88fe7c40-5829-11ea-a714-525400d38027:1-3093412
1 row in set (0.00 sec)
mysql> show master status;
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set                                                                             |
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
| mysql-bin.000209 | 17357886 |              |                  | 4af0b40c-6f3c-11e7-ad89-001e673bb989:1-179974,
88fe7c40-5829-11ea-a714-525400d38027:1-3418495 |
+------------------+----------+--------------+------------------+-----------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

@luyaotang
Copy link

the issue solved?i have the same problem 。php7.2 mysql 5.6

@yaqianghan
Copy link

Does this have any results? I also encountered

@yaqianghan
Copy link

@krowinski
Does this have any results? I also encountered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants