Skip to content

Commit b7af56c

Browse files
warrick1016patpatbear
authored andcommitted
[fix] initStatsSwap moved to InitServerLast
1 parent 013c374 commit b7af56c

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

src/ctrip_swap_server.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ void ctrip_initMonitorAcceptor() {
114114
/* Initialize only part of swap module, used by both tests and the main program. */
115115
void swapInit() {
116116
int i;
117-
initStatsSwap();
118117
swapInitVersion();
119118

120119
server.swap_eviction_ctx = swapEvictionCtxCreate();

src/server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3724,6 +3724,7 @@ void InitServerLast() {
37243724
#ifdef ENABLE_SWAP
37253725
serverRocksInit();
37263726
swapThreadsInit();
3727+
initStatsSwap();
37273728
set_jemalloc_max_bg_threads(server.jemalloc_max_bg_threads);
37283729
#endif
37293730
initThreadedIO();

0 commit comments

Comments
 (0)