MCPcopy Create free account
hub / github.com/F-Stack/f-stack / replicationSendAck

Function replicationSendAck

app/redis-6.2.6/src/replication.c:2865–2876  ·  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

2863 * processed offset. If we are not connected with a master, the command has
2864 * no effects. */
2865void replicationSendAck(void) {
2866 client *c = server.master;
2867
2868 if (c != NULL) {
2869 c->flags |= CLIENT_MASTER_FORCE_REPLY;
2870 addReplyArrayLen(c,3);
2871 addReplyBulkCString(c,"REPLCONF");
2872 addReplyBulkCString(c,"ACK");
2873 addReplyBulkLongLong(c,c->reploff);
2874 c->flags &= ~CLIENT_MASTER_FORCE_REPLY;
2875 }
2876}
2877
2878/* ---------------------- MASTER CACHING FOR PSYNC -------------------------- */
2879

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