Fix forget to update the dict's node in the kvstore's rehashing list after defragment#13231
Merged
sundb merged 6 commits intoredis:unstablefrom Apr 24, 2024
Merged
Conversation
oranagra
previously approved these changes
Apr 24, 2024
If HAVE_MALLOC_SIZE is not enabled, zmalloc_size() is included with PREFIX_SIZE, which should not be included when we reallocate memory here. But we only start defragment under jemalloc, in this case zmalloc_size() is equal to zmalloc_usable_size(), so this change is only for readability.
Wait for future. This reverts commit 318fae9.
Collaborator
Author
oranagra
approved these changes
Apr 24, 2024
sundb
added a commit
to sundb/redis
that referenced
this pull request
Apr 25, 2024
sundb
added a commit
that referenced
this pull request
Apr 25, 2024
For my mistake, in the last revert commit in #13231, I originally wanted to revert the last one, but reverted the penultimate fix. Now that we have fix another potential memory read issue in [`743f1dd` (#13231)](743f1dd), now it just seems to avoid confusion, i will verify in the future whether it will have any impact, if so we will add this PR to backport. Failed CI: https://github.com/sundb/redis/actions/runs/8826731960
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
…after defragment (redis#13231) Introducted by redis#13013 After defragmenting the dictionary in the kvstore, if the dict is reallocated, the value of its node in the kvstore rehashing list must be updated.
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
For my mistake, in the last revert commit in redis#13231, I originally wanted to revert the last one, but reverted the penultimate fix. Now that we have fix another potential memory read issue in [`743f1dd` (redis#13231)](redis@743f1dd), now it just seems to avoid confusion, i will verify in the future whether it will have any impact, if so we will add this PR to backport. Failed CI: https://github.com/sundb/redis/actions/runs/8826731960
This file contains hidden or 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
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.
Introducted by #13013
After defragmenting the dictionary in the kvstore, if the dict is reallocated, the value of its node in the kvstore rehashing list must be updated.