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

[Improve] Fix possible potential thread unsafe issues #2043

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

gjjjj0101
Copy link
Contributor

What's changed?

In a multi-threaded environment, addNode() and removeNode() will have thread unsafe issues, divides the existing addNode and removeNode functions into smaller, synchronized operations: addVirtualNode() and removeVirtualNode(). In this way, addNode() and removeNode() also can be called in parallel. And add the ConsistentHash class Unit testing

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

@tomsun28 tomsun28 added the good first pull request Good for newcomers label May 29, 2024
@tomsun28
Copy link
Contributor

lgtm!👍 This includes core scheduling changes, recommended that merge it after releasing version 1.6.0.

@tomsun28 tomsun28 added this to the 1.6.1 milestone May 29, 2024
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

lgtm!👍👍

@tomsun28 tomsun28 merged commit f10e5db into apache:master Jun 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

2 participants