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

chore: catch up with upstream (1/2) #14

Merged
merged 7 commits into from
Jul 13, 2022
Merged

Conversation

RainbowDashy
Copy link
Collaborator

@RainbowDashy RainbowDashy commented Jul 13, 2022

cherry-picked from github:master

dm-2 and others added 7 commits July 11, 2022 16:35
…data_v2

fix(lost data in mysql two-phase commit): lost data in mysql two-phas…
* compound pk tests

* more details in failure diff

* more elaborate test; the pk-ts one consistently fails

* Fix merge conflict

Co-authored-by: Shlomi Noach <shlomi-noach@github.com>
Co-authored-by: Tim Vaillancourt <timvaillancourt@github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
…)` (github#1135)

* Use `switch` statements for readability

* Simplify initBinlogReader()
* Add context/timeout to HTTP throttle check

* Dont run `.GetThrottleHTTPInterval()` on every loop

* Update help message

* Var rename

* 2022

* Add timeout flag

* Add unix/tcp server commands, use ParseInt() for string->int64

* Var rename

* Re-check http timeout on every loop iteration

* Remove stale comment

* Make throttle interval idempotent

* var rename

* Usage grammar

* Make http timeout idempotent too

* Parse time.Duration once

* Move timeout to NewThrottler

* Help update

* Set User-Agent header

* Re-add newline

Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
* Default to go1.17.11

* `go mod vendor`

Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
* Cancel any row count queries before attempting to cut over

Closes github#830. Switches from using `QueryRow` to `QueryRowContext`, and
stores a context.CancelFunc in the migration context, which is called to
halt any running row count query before beginning the cut over.

* Make it threadsafe

* Kill the count query on the database side as well

* Explicitly grab a connection to run the count, store its connection id
* When the query context is canceled, run a `KILL QUERY ?` on that connection id

* Rewrite these to use the threadsafe functions, stop exporting the cancel func

* Update logger

* Update logger

Co-authored-by: Tim Vaillancourt <timvaillancourt@github.com>
Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com>
Co-authored-by: dm-2 <45519614+dm-2@users.noreply.github.com>
@cla-bot
Copy link

cla-bot bot commented Jul 13, 2022

We require contributors to sign our Contributor License Agreement, and we don't have yours on file. In order for us to review and merge your code, please please sign CLA and add your name to contributors list.

@d-bytebase d-bytebase merged commit d78ca6e into bytebase:main Jul 13, 2022
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.

6 participants