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

diff: increase connection limit according to number of shard tables #412

Merged
merged 6 commits into from
Feb 18, 2021

Conversation

lance6716
Copy link
Collaborator

@lance6716 lance6716 commented Feb 9, 2021

What problem does this PR solve?

close #411

What is changed and how it works?

one chunk need accessing every shard tables in one upstream, and there are CheckThreadCount simultaneously processing chunks. Adjust connection limit to fix the worst case which needs CheckThreadCount * number of shard tables connections.

Check List

Tests

  • Integration test
  • Manual test (an integration test of DM could pass)

Code changes

Side effects

Related changes

  • Need to be included in the release note

pkg/diff/diff.go Outdated
Comment on lines 624 to 626
if err := sourceRows[i].Close(); err != nil {
return nil, err
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 what to do with the defer rows.Close() in line 574 then

@lance6716 lance6716 changed the title diff: close sql.Rows earlier to avoid blocking [WIP] diff: close sql.Rows earlier to avoid blocking Feb 11, 2021
@lance6716 lance6716 changed the title [WIP] diff: close sql.Rows earlier to avoid blocking diff: increase connection limit according to number of shard tables Feb 12, 2021
@lance6716
Copy link
Collaborator Author

/run-all-tests

@lance6716
Copy link
Collaborator Author

changed the behaviour and PR description. Happy Chinese New Year

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sync-diff stuck
4 participants