Skip to content

Conversation

@sundb
Copy link
Collaborator

@sundb sundb commented Apr 22, 2024

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.

@sundb sundb requested a review from oranagra April 22, 2024 11:24
oranagra
oranagra previously approved these changes Apr 24, 2024
sundb added 2 commits April 24, 2024 15:45
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.
@sundb
Copy link
Collaborator Author

sundb commented Apr 24, 2024

@sundb sundb requested a review from oranagra April 24, 2024 08:04
@sundb sundb merged commit 772564f into redis:unstable Apr 24, 2024
@sundb sundb deleted the missing-update-kvs-rehashing branch April 24, 2024 08:15
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants