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

Performance improvement cluster slots slotNodes cache switch hashmap to arrays #3373

Merged
merged 5 commits into from
Apr 27, 2023
Merged

Performance improvement cluster slots slotNodes cache switch hashmap to arrays #3373

merged 5 commits into from
Apr 27, 2023

Conversation

chenshi5012
Copy link
Contributor

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.

…to arrays

Signed-off-by: c00603587 <chenshi35@huawei.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2023

Codecov Report

Patch coverage: 83.33% and no project coverage change.

Comparison is base (b2c5acf) 67.24% compared to head (446457e) 67.24%.

❗ Current head 446457e differs from pull request most recent head edd0530. Consider uploading reports for the commit edd0530 to get more accurate results

📣 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     
Impacted Files Coverage Δ
...ava/redis/clients/jedis/JedisClusterInfoCache.java 75.62% <83.33%> (+3.12%) ⬆️

... 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chenshi5012
Copy link
Contributor Author

add link 3372 @sazzad16 could you make a code review.

Copy link
Contributor

@zeekling zeekling left a comment

Choose a reason for hiding this comment

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

LGTM

@sazzad16 sazzad16 added this to the 4.4.0 milestone Apr 20, 2023
@chenshi5012 chenshi5012 requested a review from zeekling April 20, 2023 10:56
Copy link

@dormanze dormanze left a comment

Choose a reason for hiding this comment

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

LGTM

@chenshi5012
Copy link
Contributor Author

@dengliming @sazzad16 here is a code-review request for you. ( ^_^ )

@chenshi5012
Copy link
Contributor Author

@sazzad16 thanks. my pleasure

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.

7 participants