disable key cache during load if necessary
Former-commit-id: 68dcf66909e2138da4902bdec98985f4fcd737cf
This commit is contained in:
parent
9d78b8bb08
commit
ac22f3c60f
10
src/rdb.cpp
10
src/rdb.cpp
@ -2683,6 +2683,16 @@ public:
|
||||
ProcessWhileBlocked();
|
||||
resumeExecution();
|
||||
}
|
||||
|
||||
if ((getMaxmemoryState(NULL,NULL,NULL,NULL) != C_OK)) {
|
||||
for (int idb = 0; idb < cserver.dbnum; ++idb) {
|
||||
redisDb *db = g_pserver->db[idb];
|
||||
if (db->size() > 0 && db->keycacheIsEnabled()) {
|
||||
serverLog(LL_WARNING, "Key cache %d exceeds maxmemory during load, freeing - performance may be affected increase maxmemory if possible", idb);
|
||||
db->disableKeyCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user