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

Fix bugs and add test cases for cluster ConnectionManager #467

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Jan 28, 2019

Describe what this PR does / why we need it

Fix bugs and add test cases for cluster ConnectionManager. The bugs include:

  • NPE bug when multiple threads are trying to creating connection group in ConnectionManager
  • Duplicate count increment when adding the same connection

Does this pull request fix one issue?

Fixes #463

Describe how you did it

  • Fix NPE bug when creating connection group in ConnectionManager
  • When adding a duplicate address to ConnectionGroup, do not increment the connection count
  • Add test cases

Describe how to verify it

Run the test cases.

Special notes for reviews

NONE

- The NPE will occur when multiple threads are trying to create the connection group for the same namespace

Signed-off-by: Eric Zhao <[email protected]>
@sczyh30 sczyh30 added the to-review To review label Jan 28, 2019
Copy link
Contributor

@CarpenterLee CarpenterLee left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit ee4a0d4 into master Jan 31, 2019
@sczyh30 sczyh30 deleted the fix/cluster-conn-npe branch January 31, 2019 06:25
@sczyh30 sczyh30 removed the to-review To review label Jan 31, 2019
CST11021 pushed a commit to CST11021/Sentinel that referenced this pull request Nov 3, 2021
[ISSUE alibaba#467] fix Message missed after recovering from abnormal shutdown
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.

NullPointException occurred when ClusterServer shutdown and then startup
2 participants