Fix polarity issue in async rehash

Former-commit-id: 9eefba49d4fcde7f12929929d7aeb36f5186a63d
This commit is contained in:
John Sully 2021-02-09 02:41:44 +00:00
parent 3de15c16ac
commit e5e1350219

View File

@ -1950,7 +1950,7 @@ void databasesCron(bool fMainThread) {
::dict *dict = g_pserver->db[rehash_db]->dictUnsafeKeyOnly();
/* Are we async rehashing? And if so is it time to re-calibrate? */
/* The recalibration limit is a prime number to ensure balancing across threads */
if (rehashes_per_ms > 0 && async_rehashes < 131 && cserver.active_defrag_enabled) {
if (rehashes_per_ms > 0 && async_rehashes < 131 && !cserver.active_defrag_enabled) {
serverTL->rehashCtl = dictRehashAsyncStart(dict, rehashes_per_ms);
++async_rehashes;
}