Remove redundant defrag dictEntry in activeDefragSdsListAndDict. (#8713)
In activeDefragSdsListAndDict when defrag list key sucess, the key in dict is also replaced. Then the corresponding dictEntry is defraged. But the dictEntry will be defraged in next step by defrag the dict values too.
This commit is contained in:
parent
c25ccc3208
commit
36424b8e0f
@ -347,7 +347,9 @@ long activeDefragSdsListAndDict(list *l, dict *d, int dict_val_type) {
|
||||
if ((newsds = activeDefragSds(sdsele))) {
|
||||
/* When defragging an sds value, we need to update the dict key */
|
||||
uint64_t hash = dictGetHash(d, newsds);
|
||||
replaceSatelliteDictKeyPtrAndOrDefragDictEntry(d, sdsele, newsds, hash, &defragged);
|
||||
dictEntry **deref = dictFindEntryRefByPtrAndHash(d, sdsele, hash);
|
||||
if (deref)
|
||||
(*deref)->key = newsds;
|
||||
ln->value = newsds;
|
||||
defragged++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user