Skip to content

Out-of-order appliance of binlog events #30

Closed

Description

@shlomi-noach

In the attempt to make binlog events appliance non blocking to the operation (to throttling, to status events), an out-of-order scenario was introduced.
This was found when experimenting with intensively written production tables (hey, I was testing with --test-on-replica so no risk to data!).

The source of problem is https://github.com/github/gh-osc/blob/master/go/logic/migrator.go#L615-L626 . Note the true as the async parameter.
Need to find a solution when binlog events are async to other events, but are streamlined in-order between themselves.

Activity

  1. self-assigned this
    on May 5, 2016
  2. shlomi-noach commented on May 6, 2016

    @shlomi-noach
    ContributorAuthor

    #31 does not solve the problem yet. I'm able to reproduce on local machine so this will hopefully boost the solution.

  3. shlomi-noach commented on May 6, 2016

    @shlomi-noach
    ContributorAuthor

    Reproducing locally and adding a bit more output, this seems right now to be the best hint:

    2016-05-06 08:18:03 DEBUG Issued INSERT on range: [3521]..[4161]; iteration: 11; chunk-size: 200
    2016-05-06 08:18:03 DEBUG Issued INSERT on range: [4161]..[4361]; iteration: 12; chunk-size: 200
    2016-05-06 08:18:03 DEBUG Issued INSERT on range: [4361]..[4561]; iteration: 13; chunk-size: 200
    2016-05-06 08:18:03 DEBUG Issued INSERT on range: [4561]..[4675]; iteration: 14; chunk-size: 200
    2016-05-06 08:18:03 DEBUG Iteration complete: no further range to iterate
    2016-05-06 08:18:03 DEBUG Row copy complete
    Copy: 2915/2915 100.0%; Applied: 212; Backlog: 11/100; Elapsed: 0s(copy), 0s(total); ETA: 0s
    2016-05-06 08:18:03 DEBUG testing on replica. Instead of LOCK tables I will STOP SLAVE
    2016-05-06 08:18:03 INFO Stopping replication
    2016-05-06 08:18:03 INFO Replication stopped
    2016-05-06 08:18:03 DEBUG Waiting for events up to lock
    2016-05-06 08:18:03 DEBUG Done waiting for events up to lock
    2016-05-06 08:18:03 DEBUG Received state AllEventsUpToLockProcessed
    Copy: 2915/2915 100.0%; Applied: 229; Backlog: 15/100; Elapsed: 0s(copy), 0s(total); ETA: 0s
    2016-05-06 08:18:03 INFO Table duplicated with new schema. Am not touching the original table. Replication is stopped. You may now compare the two tables to gain trust into this tool's operation
    2016-05-06 08:18:03 INFO Done
    

    Note Copy: 2915/2915 100.0%; Applied: 229; Backlog: 15/100; Elapsed: 0s(copy), 0s(total); ETA: 0s
    There is a backlog of 15 events which I suspect have not been applied because they are buffered and non blocking the termination of the app.

  4. shlomi-noach commented on May 16, 2016

    @shlomi-noach
    ContributorAuthor

    Closed by #31

  5. added a commit that references this issue on Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions