This should fix Issue 332: when there is a background process saving we still allow the hash tables to grow, but only when a critical treshold is reached. Formerly we prevented the resize at all triggering pathological O(N) behavior. Also there is a fix for the statistics in INFO about the number of keys expired

This commit is contained in:
antirez
2010-09-15 14:09:41 +02:00
parent 412e457c27
commit 3856f14759
2 changed files with 22 additions and 7 deletions

View File

@ -1343,6 +1343,7 @@ void freeMemoryIfNeeded(void) {
}
keyobj = createStringObject(minkey,sdslen(minkey));
dbDelete(server.db+j,keyobj);
server.stat_expiredkeys++;
decrRefCount(keyobj);
}
}