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

Function RM_AvoidReplicaTraffic

src/module.cpp:2278–2281  ·  view source on GitHub ↗

Returns true if some client sent the CLIENT PAUSE command to the server or * if Redis Cluster is doing a manual failover, and paused tue clients. * This is needed when we have a master with replicas, and want to write, * without adding further data to the replication channel, that the replicas * replication offset, match the one of the master. When this happens, it is * safe to failover the m

Source from the content-addressed store, hash-verified

2276 * periodically in timer callbacks or other periodic callbacks.
2277 */
2278int RM_AvoidReplicaTraffic() {
2279 moduleSetThreadVariablesIfNeeded();
2280 return checkClientPauseTimeoutAndReturnIfPaused();
2281}
2282
2283/* Change the currently selected DB. Returns an error if the id
2284 * is out of range.

Callers

nothing calls this directly

Tested by

no test coverage detected