Skip to content

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

Open

Description

@shlomi-noach

--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.

Activity

  1. freediver9000 commented on Aug 12, 2016

    @freediver9000

    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" notifications@github.com 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
    .

  2. shlomi-noach commented on Aug 12, 2016

    @shlomi-noach
    ContributorAuthor

    @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?

  3. shlomi-noach commented on Aug 12, 2016

    @shlomi-noach
    ContributorAuthor

    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.

  4. shlomi-noach commented on Aug 12, 2016

    @shlomi-noach
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions