Optimize CPU cache efficiency on dict while rehashing in dictTwoPhaseUnlinkFind (#12818)

In #5692, we optimize CPU cache efficiency on dict while rehashing but
missed the modification in dictTwoPhaseUnlinkFind.

This PR supplements it.
This commit is contained in:
lyq2333 2023-11-30 13:50:09 +08:00 committed by GitHub
parent 22cc9b5122
commit 423565f784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -718,6 +718,7 @@ dictEntry *dictTwoPhaseUnlinkFind(dict *d, const void *key, dictEntry ***plink,
for (table = 0; table <= 1; table++) {
idx = h & DICTHT_SIZE_MASK(d->ht_size_exp[table]);
if (table == 0 && (long)idx < d->rehashidx) continue;
dictEntry **ref = &d->ht_table[table][idx];
while (ref && *ref) {
void *de_key = dictGetKey(*ref);