diff --git a/src/ctrip_swap_server.c b/src/ctrip_swap_server.c index 694b6a0692c..97452ba2f75 100644 --- a/src/ctrip_swap_server.c +++ b/src/ctrip_swap_server.c @@ -114,7 +114,6 @@ void ctrip_initMonitorAcceptor() { /* Initialize only part of swap module, used by both tests and the main program. */ void swapInit() { int i; - initStatsSwap(); swapInitVersion(); server.swap_eviction_ctx = swapEvictionCtxCreate(); diff --git a/src/server.c b/src/server.c index 203d68a09bd..f32989cd66d 100644 --- a/src/server.c +++ b/src/server.c @@ -3723,6 +3723,7 @@ void InitServerLast() { #ifdef ENABLE_SWAP serverRocksInit(); swapThreadsInit(); + initStatsSwap(); set_jemalloc_max_bg_threads(server.jemalloc_max_bg_threads); #endif initThreadedIO();