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

support --sql-log-bin (bool) #149

Open
shlomi-noach opened this issue Aug 11, 2016 · 4 comments
Open

support --sql-log-bin (bool) #149

shlomi-noach opened this issue Aug 11, 2016 · 4 comments

Comments

@shlomi-noach
Copy link
Contributor

--sql-log-bin would default true. When false, writes to ghost table will not be logged to binlogs.

This may only work on:

  • --test-on-replica
  • --migrate-on-replica
  • --allow-on-master

This cannot work on normal connect-to-replica-and-write-on-master.

When GTID is enabled such writes would cause errant transactions.

Note: the changelog table also gets writes. In the event you're using GTID this still calls for a problem if you're migrating on a replica. See #146 for more discussion.

@freediver9000
Copy link

Would it be acceptable to update the master with a dummy transaction for
the single update on the changelog table?

Dave

On Aug 11, 2016 12:31 AM, "Shlomi Noach" [email protected] wrote:

--sql-log-bin would default true. When false, writes to ghost table
will not be logged to binlogs.

This may only work on:

  • --test-on-replica
  • --migrate-on-replica
  • --allow-on-master

This cannot work on normal connect-to-replica-and-write-on-master.

When GTID is enabled such writes would cause errant transactions.

Note: the changelog table also gets writes. In the event you're using
GTID this still calls for a problem if you're migrating on a replica. See
#146 #146 for more discussion.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#149, or mute the thread
https://github.com/notifications/unsubscribe-auth/ADijdAm-P8a9tTxWuUDRJ4obWdXTVY8uks5qes8ngaJpZM4Jh3HI
.

@shlomi-noach
Copy link
Contributor Author

@freediver9000 would you know if this needs to be in sync with the write on replica, or how do I make MySQL understand the two are related?

@shlomi-noach
Copy link
Contributor Author

I believe the aforementioned write to the changelog table can be skipped in the event of

  • running directly on master
  • migrating on replica
  • testing on replica

i.e. any case where migrationContext.InspectorIsAlsoApplier(). Will wrap my head around this next days.

@shlomi-noach
Copy link
Contributor Author

so much GTID pain. So many operations must prepend with set sql_log_bin:=0; this includes the very creation of changelog table, writes onto it, the cut-over operations and others.

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

Successfully merging a pull request may close this issue.

2 participants