We need to periodically flush the GC or we'll end up blocking with a huge backlog at the end of load
Former-commit-id: 29c0bf79ad1a810e808790de2f7db24f3cc603e8
This commit is contained in:
parent
fc7221739c
commit
a3cf05574f
@ -2884,6 +2884,8 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi) {
|
|||||||
do this every 16 keys to limit the perf impact */
|
do this every 16 keys to limit the perf impact */
|
||||||
if (g_pserver->m_pstorageFactory && (ckeysLoaded % 128) == 0)
|
if (g_pserver->m_pstorageFactory && (ckeysLoaded % 128) == 0)
|
||||||
{
|
{
|
||||||
|
g_pserver->garbageCollector.endEpoch(serverTL->gcEpoch);
|
||||||
|
serverTL->gcEpoch = g_pserver->garbageCollector.startEpoch();
|
||||||
bool fHighMemory = (getMaxmemoryState(NULL,NULL,NULL,NULL) != C_OK);
|
bool fHighMemory = (getMaxmemoryState(NULL,NULL,NULL,NULL) != C_OK);
|
||||||
if (fHighMemory || (ckeysLoaded % (1024)) == 0)
|
if (fHighMemory || (ckeysLoaded % (1024)) == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user