-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: binary list key randomly droped by lrem #2118
Merged
AlexStocks
merged 8 commits into
OpenAtomFoundation:unstable
from
Summer-0827:fix_redis_lists_strcmp
Nov 13, 2023
Merged
fix: binary list key randomly droped by lrem #2118
AlexStocks
merged 8 commits into
OpenAtomFoundation:unstable
from
Summer-0827:fix_redis_lists_strcmp
Nov 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Discussion from the Pika developer community group : If there is '\x00' in the data, the strcmp function will terminate prematurely, resulting in incorrect comparison results. The solution is to use memcmp or the == operator of Slice (which internally uses memcmp) for comparison, which ensures the correctness of the comparison results. |
AlexStocks
previously approved these changes
Nov 13, 2023
wanghenshui
reviewed
Nov 13, 2023
wanghenshui
changed the title
memcmp replace strcmp
fix: binary list key randomly droped by lrem
Nov 13, 2023
wanghenshui
previously approved these changes
Nov 13, 2023
wanghenshui
reviewed
Nov 13, 2023
wanghenshui
previously approved these changes
Nov 13, 2023
wanghenshui
approved these changes
Nov 13, 2023
AlexStocks
approved these changes
Nov 13, 2023
bigdaronlee163
pushed a commit
to bigdaronlee163/pika
that referenced
this pull request
Jun 8, 2024
* memcmp replace strcmp * fix * pivot covert to Slice * add lists unit test * no need convert to slice * Update src/storage/src/redis_lists.cc * fix space in redis_lists.cc --------- Co-authored-by: yaxin0710 <[email protected]> Co-authored-by: Ted Mostly <[email protected]>
cheniujh
pushed a commit
to cheniujh/pika
that referenced
this pull request
Sep 24, 2024
* memcmp replace strcmp * fix * pivot covert to Slice * add lists unit test * no need convert to slice * Update src/storage/src/redis_lists.cc * fix space in redis_lists.cc --------- Co-authored-by: yaxin0710 <[email protected]> Co-authored-by: Ted Mostly <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.slice之间的比较用==
2.非slice之间的比较用memcmp