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

Function slaveIsInHandshakeState

src/replication.cpp:2305–2308  ·  view source on GitHub ↗

Returns 1 if the given replication state is a handshake state, * 0 otherwise. */

Source from the content-addressed store, hash-verified

2303/* Returns 1 if the given replication state is a handshake state,
2304 * 0 otherwise. */
2305int slaveIsInHandshakeState(redisMaster *mi) {
2306 return mi->repl_state >= REPL_STATE_RECEIVE_PING_REPLY &&
2307 mi->repl_state <= REPL_STATE_RECEIVE_PSYNC_REPLY;
2308}
2309
2310/* Avoid the master to detect the replica is timing out while loading the
2311 * RDB file in initial synchronization. We send a single newline character

Callers 3

roleCommandFunction · 0.85
replicationCronFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected