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

Function replicationSendAck

src/replication.cpp:4287–4300  ·  view source on GitHub ↗

Send a REPLCONF ACK command to the master to inform it about the current * processed offset. If we are not connected with a master, the command has * no effects. */

Source from the content-addressed store, hash-verified

4285 * processed offset. If we are not connected with a master, the command has
4286 * no effects. */
4287void replicationSendAck(redisMaster *mi)
4288{
4289 client *c = mi->master;
4290
4291 if (c != NULL) {
4292 std::unique_lock<fastlock> ul(c->lock);
4293 c->flags |= CLIENT_MASTER_FORCE_REPLY;
4294 addReplyArrayLen(c,3);
4295 addReplyBulkCString(c,"REPLCONF");
4296 addReplyBulkCString(c,"ACK");
4297 addReplyBulkLongLong(c,c->reploff);
4298 c->flags &= ~CLIENT_MASTER_FORCE_REPLY;
4299 }
4300}
4301
4302/* ---------------------- MASTER CACHING FOR PSYNC -------------------------- */
4303

Callers 3

replconfCommandFunction · 0.85
readSyncBulkPayloadFunction · 0.85
replicationCronFunction · 0.85

Calls 3

addReplyArrayLenFunction · 0.85
addReplyBulkCStringFunction · 0.85
addReplyBulkLongLongFunction · 0.85

Tested by

no test coverage detected