This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* define conn split workerConn and upstreamConn in syncer split conn and db unify conn in syncer and loader * change upstream DB to BaseDB * update raw db config
how about changing the title (and the commit message later) to |
3pointer
changed the title
cherry-pick: refine conn (#266)
dm-worker: refine conn (#266)
Oct 18, 2019
sure, and the commit message already be |
Codecov Report
@@ Coverage Diff @@
## release-1.0 #325 +/- ##
================================================
Coverage ? 59.9333%
================================================
Files ? 135
Lines ? 15010
Branches ? 0
================================================
Hits ? 8996
Misses ? 5144
Partials ? 870 |
csuzhangxc
reviewed
Oct 18, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
csuzhangxc
added
priority/normal
Minor change, requires approval from ≥1 primary reviewer
priority/release-blocker
This PR blocks a release. Please review it ASAP.
status/LGT1
One reviewer already commented LGTM
type/cherry-pick
This PR is just a cherry-pick (backport)
type/enhancement
Performance improvement or refactoring
labels
Oct 18, 2019
@WangXiangUSTC @amyangfei PTAL |
WangXiangUSTC
approved these changes
Oct 18, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
WangXiangUSTC
added
status/LGT2
Two reviewers already commented LGTM, ready for merge
and removed
status/LGT1
One reviewer already commented LGTM
labels
Oct 18, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
priority/normal
Minor change, requires approval from ≥1 primary reviewer
priority/release-blocker
This PR blocks a release. Please review it ASAP.
status/LGT2
Two reviewers already commented LGTM, ready for merge
type/cherry-pick
This PR is just a cherry-pick (backport)
type/enhancement
Performance improvement or refactoring
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry-pick this PR to release-1.0
What problem does this PR solve?
Optimize Database connections in dm-worker units, after unify DB operations
What is changed and how it works?
conn.DBProvider.Apply
*sql.DB
in upstream, and use individual connection for each worker in downstream.BaseDB generates BaseConn, BaseConn wraps sql.Conn with own retry policy
BaseDB -> BaseConn correspond to sql.DB -> sql.Conn
In our scenario, there are two main reasons why we need BaseConn
So we split a fixed sql.Conn out of sql.DB, and wraps it to BaseConn
And Similar with sql.Conn, all BaseConn generated from one BaseDB shares this BaseDB to reset
Check List
Tests
Code changes
Side effects
Related changes
dm/dm-ansible