Skip to content

Commit

Permalink
memory mode: swap init after server init because swap init depends on…
Browse files Browse the repository at this point in the history
… server init.
  • Loading branch information
patpatbear committed Jan 15, 2025
1 parent 8ffe8d5 commit 8a87a07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -6625,10 +6625,10 @@ int main(int argc, char **argv) {
getRandomBytes(hashseed,sizeof(hashseed));
dictSetHashFunctionSeed(hashseed);
server.sentinel_mode = checkForSentinelMode(argc,argv);
initServerConfig();
#ifdef ENABLE_SWAP
swapInitServerConfig();
#endif
initServerConfig();
ACLInit(); /* The ACL subsystem must be initialized ASAP because the
basic networking code and client creation depends on it. */
moduleInitModulesSystem();
Expand Down Expand Up @@ -6734,10 +6734,10 @@ int main(int argc, char **argv) {
}

readOOMScoreAdj();
initServer();
#ifdef ENABLE_SWAP
swapInitServer();
#endif
initServer();
if (background || server.pidfile) createPidFile();
if (server.set_proc_title) redisSetProcTitle(NULL);
redisAsciiArt();
Expand Down

0 comments on commit 8a87a07

Please sign in to comment.