MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / initMasterInfo

Function initMasterInfo

src/server.cpp:3234–3256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3232}
3233
3234void initMasterInfo(redisMaster *master)
3235{
3236 if (cserver.default_masterauth)
3237 master->masterauth = sdsdup(cserver.default_masterauth);
3238 else
3239 master->masterauth = NULL;
3240
3241 if (cserver.default_masteruser)
3242 master->masteruser = zstrdup(cserver.default_masteruser);
3243 else
3244 master->masteruser = NULL;
3245
3246 master->masterport = 6379;
3247 master->master = NULL;
3248 master->cached_master = NULL;
3249 master->master_initial_offset = -1;
3250
3251 master->isActive = false;
3252
3253 master->repl_state = REPL_STATE_NONE;
3254 master->repl_down_since = 0; /* Never connected, repl is down since EVER. */
3255 master->mvccLastSync = 0;
3256}
3257
3258void initServerConfig(void) {
3259 int j;

Callers 1

replicationAddMasterFunction · 0.85

Calls 2

sdsdupFunction · 0.85
zstrdupFunction · 0.85

Tested by

no test coverage detected