Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

improve coverage for syncer/sharding_group.go to 82.4% #1069

Merged
merged 8 commits into from
Sep 23, 2020

Conversation

lance6716
Copy link
Collaborator

@lance6716 lance6716 commented Sep 21, 2020

What problem does this PR solve?

part of #998

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

  • Need to cherry-pick to the release branch

@lance6716 lance6716 changed the title [WIP] improve coverage for github.com/pingcap/dm/syncer/sharding_group.go improve coverage for syncer/sharding_group.go to 82.4% Sep 21, 2020
@lance6716 lance6716 added needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 priority/normal Minor change, requires approval from ≥1 primary reviewer status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 21, 2020
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -557,9 +542,11 @@ func (k *ShardingGroupKeeper) UnresolvedTables() (map[string]bool, [][]string) {
tables := make([][]string, 0, 10)
k.RLock()
defer k.RUnlock()
// TODO: where does k.groups delete its key?
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete the key after all tables/schemas leave the group (the group becomes empty)?

@csuzhangxc csuzhangxc added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 23, 2020
@lance6716
Copy link
Collaborator Author

/run-all-tests

Copy link
Collaborator

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@GMHDBJD GMHDBJD added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Sep 23, 2020
@lance6716 lance6716 merged commit aca26a9 into pingcap:master Sep 23, 2020
@ti-srebot
Copy link

cherry pick to release-2.0 in PR #1082

@ti-srebot ti-srebot added already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked and removed needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 labels Sep 23, 2020
csuzhangxc pushed a commit that referenced this pull request Sep 23, 2020
Co-authored-by: lance6716 <lance6716@gmail.com>
@lance6716 lance6716 deleted the cover-3 branch July 6, 2021 02:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants