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

sink/mysql: rollback txn to recycle db conn, refine timeout param in db conn #1279

Merged
merged 4 commits into from
Jan 7, 2021

Conversation

amyangfei
Copy link
Contributor

@amyangfei amyangfei commented Jan 6, 2021

What problem does this PR solve?

Fix bug in #1261 & #1275

What is changed and how it works?

Besides, this PR doesn't introduce any timeout context to control database operation, since at current stage, TiCDC doesn't need to have an accurate running time limit for database operation.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
    • add read-timeout, write-timeout and timeout in sink uri parameters

Release note

  • Fix a bug that MySQL connection is not recycled when some transactions executed with failure.
  • Fix a bug that MySQL sink could hang if downstream TiDB/MySQL is not available.

@amyangfei amyangfei added type/bugfix This PR fixes a bug. component/sink Sink component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. needs-cherry-pick-5.0-rc labels Jan 6, 2021
@amyangfei amyangfei added this to the v4.0.10 milestone Jan 6, 2021
@amyangfei
Copy link
Contributor Author

/run-all-tests

@codecov-io
Copy link

Codecov Report

Merging #1279 (16e32b3) into master (589e739) will increase coverage by 0.2931%.
The diff coverage is 68.4210%.

@@               Coverage Diff                @@
##             master      #1279        +/-   ##
================================================
+ Coverage   46.1910%   46.4841%   +0.2931%     
================================================
  Files           129        129                
  Lines         13022      13041        +19     
================================================
+ Hits           6015       6062        +47     
+ Misses         6342       6317        -25     
+ Partials        665        662         -3     

@amyangfei amyangfei added the status/ptal Could you please take a look? label Jan 6, 2021
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 7, 2021
@overvenus
Copy link
Member

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jan 7, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 7, 2021
@amyangfei
Copy link
Contributor Author

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 7, 2021
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 8525eb9 into pingcap:master Jan 7, 2021
ti-srebot pushed a commit to ti-srebot/ticdc that referenced this pull request Jan 7, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@amyangfei amyangfei deleted the refine-mysql-op branch January 7, 2021 07:33
ti-srebot pushed a commit to ti-srebot/ticdc that referenced this pull request Jan 7, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
ti-srebot added a commit that referenced this pull request Jan 7, 2021
…db conn (#1279) (#1285)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
ti-srebot added a commit that referenced this pull request Jan 7, 2021
…db conn (#1279) (#1286)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@amyangfei amyangfei added the priority/P0 The issue has P0 priority. label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/sink Sink component. needs-cherry-pick-release-4.0 Should cherry pick this PR to release-4.0 branch. priority/P0 The issue has P0 priority. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. status/ptal Could you please take a look? type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mysql sink is blocked by mysql client Creating sink blocks owner
5 participants