Skip to content

Fix edge cases in MariaDB backup/restore + reparent scenarios.#1778

Merged
enisoc merged 2 commits into
vitessio:masterfrom
enisoc:gtid
Jun 10, 2016
Merged

Fix edge cases in MariaDB backup/restore + reparent scenarios.#1778
enisoc merged 2 commits into
vitessio:masterfrom
enisoc:gtid

Conversation

@enisoc
Copy link
Copy Markdown
Contributor

@enisoc enisoc commented Jun 10, 2016

@michael-berlin


This change is Reviewable

Anthony Yeh added 2 commits June 8, 2016 19:54
Although the demoted master case was working fine before, this is more
correct.
This fixes an edge case where a gtid_strict_mode sanity check would fail
when a slave tries to replicate starting at exactly the same GTID
position at which the master's history began.

For example, suppose the master was previously restored from a backup that
had been taken at GTID position X, and then a slave connects and requests
to replicate at exactly position X. The master would reject the attempt
because it only has GTIDs AFTER X in its binlog - not X itself.

Setting gtid_binlog_state upon restoring tells the master to assume that
the given position existed in its binlogs prior to a purge. This allows
the gtid_strict_mode sanity check to succeed.
@enisoc enisoc added this to the v2.0 milestone Jun 10, 2016
@michael-berlin
Copy link
Copy Markdown
Contributor

michael-berlin commented Jun 10, 2016

:lgtm:

Previously, enisoc (Anthony Yeh) wrote…

Fix edge cases in MariaDB backup/restore + reparent scenarios.

@michael-berlin


Reviewed 4 of 4 files at r1, 3 of 3 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

Approved with PullApprove

@enisoc enisoc merged commit c02fecc into vitessio:master Jun 10, 2016
@enisoc enisoc deleted the gtid branch June 10, 2016 18:45
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

Successfully merging this pull request may close these issues.

3 participants