fix the wrong judgement for activerehashing in standalone mode (#12741)

Introduced by #11695, the judgement should be dictIsRehashing.
This commit is contained in:
zhaozhao.zz 2023-11-09 17:30:50 +08:00 committed by GitHub
parent 53294e537c
commit cf6ed3feeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,13 +692,13 @@ int incrementallyRehash(int dbid) {
} else {
/* Rehash main dict. */
dict *main_dict = server.db[dbid].dict[0];
if (main_dict) {
if (dictIsRehashing(main_dict)) {
dictRehashMilliseconds(main_dict, INCREMENTAL_REHASHING_THRESHOLD_MS);
return 1; /* already used our millisecond for this loop... */
}
/* Rehash expires. */
dict *expires_dict = server.db[dbid].expires[0];
if (expires_dict) {
if (dictIsRehashing(expires_dict)) {
dictRehashMilliseconds(expires_dict, INCREMENTAL_REHASHING_THRESHOLD_MS);
return 1; /* already used our millisecond for this loop... */
}