-
Notifications
You must be signed in to change notification settings - Fork 742
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
Optimize the checking logic for conversion to skiplist in advance. #806
Conversation
…plist during zadd operation Signed-off-by: RayCao <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #806 +/- ##
============================================
- Coverage 70.46% 70.31% -0.15%
============================================
Files 112 112
Lines 61135 61315 +180
============================================
+ Hits 43077 43115 +38
- Misses 18058 18200 +142
|
@RayaCoo Can you fix the formatting errors? I'm also curious if there is some specific use case this is trying to optimize. The size_hint is to optimize the case where the first addition is adding a lot of elements. I'm not sure how often there are cases where all items are that large. Is there a specific use case you had in mind? |
Signed-off-by: RayCao <[email protected]>
Signed-off-by: RayCao <[email protected]>
@madolson Format error has been fixed.
unstable
this PR
PS: Length of the last member is greater than default unstable
this PR
unstable
this PR
|
good job! @enjoy-binbin do you wanna take a look? |
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.
Signed-off-by: Binbin <[email protected]>
During the ZADD operation, a conversion from listpack to skiplist might be necessary for the sorted set. Currently, the function zsetTypeMaybeConvert only examines the number of elements but does not check the Max size of the elements. It is advisable to include a check for value_len_hint for a more robust conversion check mechanism.