-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Performance improvement cluster slots slotNodes cache switch hashmap to arrays #3373
Conversation
…to arrays Signed-off-by: c00603587 <chenshi35@huawei.com>
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #3373 +/- ##
=========================================
Coverage 67.24% 67.24%
- Complexity 4728 4729 +1
=========================================
Files 269 269
Lines 15273 15273
Branches 964 964
=========================================
Hits 10270 10270
- Misses 4583 4584 +1
+ Partials 420 419 -1
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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
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
@dengliming @sazzad16 here is a code-review request for you. ( ^_^ ) |
@sazzad16 thanks. my pleasure |
since slots are numbers,so slots cache can be switch to arrays. like
{0=127.0.0.1:7379, 1=127.0.0.1:7379, 2=127.0.0.1:7379, 3=127.0.0.1:7379 ........ 16382=127.0.0.1:7381, 16383=127.0.0.1:7381}
to
[0=127.0.0.1:7379, 1=127.0.0.1:7379, 2=127.0.0.1:7379, 3=127.0.0.1:7379 ........ 16382=127.0.0.1:7381, 16383=127.0.0.1:7381]
addressing algorithm: arrays faster than hashmap.