Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d6180c8c
Unverified
Commit
d6180c8c
authored
Jul 10, 2020
by
huangzhw
Committed by
GitHub
Jul 10, 2020
Browse files
defrag.c activeDefragSdsListAndDict when defrag sdsele, We can't use (#7492)
it to calculate hash, we should use newsds.
parent
909bc97c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/defrag.c
View file @
d6180c8c
...
@@ -348,7 +348,7 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) {
...
@@ -348,7 +348,7 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) {
sdsele
=
ln
->
value
;
sdsele
=
ln
->
value
;
if
((
newsds
=
activeDefragSds
(
sdsele
)))
{
if
((
newsds
=
activeDefragSds
(
sdsele
)))
{
/* When defragging an sds value, we need to update the dict key */
/* When defragging an sds value, we need to update the dict key */
uint64_t
hash
=
dictGetHash
(
d
,
sds
ele
);
uint64_t
hash
=
dictGetHash
(
d
,
new
sds
);
replaceSateliteDictKeyPtrAndOrDefragDictEntry
(
d
,
sdsele
,
newsds
,
hash
,
&
defragged
);
replaceSateliteDictKeyPtrAndOrDefragDictEntry
(
d
,
sdsele
,
newsds
,
hash
,
&
defragged
);
ln
->
value
=
newsds
;
ln
->
value
=
newsds
;
defragged
++
;
defragged
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment