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

Function forceCommandPropagation

src/server.cpp:4421–4425  ·  view source on GitHub ↗

It is possible to call the function forceCommandPropagation() inside a * Redis command implementation in order to to force the propagation of a * specific command execution into AOF / Replication. */

Source from the content-addressed store, hash-verified

4419 * Redis command implementation in order to to force the propagation of a
4420 * specific command execution into AOF / Replication. */
4421void forceCommandPropagation(client *c, int flags) {
4422 serverAssert(c->cmd->flags & (CMD_WRITE | CMD_MAY_REPLICATE));
4423 if (flags & PROPAGATE_REPL) c->flags |= CLIENT_FORCE_REPL;
4424 if (flags & PROPAGATE_AOF) c->flags |= CLIENT_FORCE_AOF;
4425}
4426
4427/* Avoid that the executed command is propagated at all. This way we
4428 * are free to just propagate what we want using the alsoPropagate()

Callers 3

publishCommandFunction · 0.85
evalGenericCommandFunction · 0.85
scriptCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected