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

Function feedReplicationBacklogWithObject

src/replication.cpp:453–466  ·  view source on GitHub ↗

Wrapper for feedReplicationBacklog() that takes Redis string objects * as input. */

Source from the content-addressed store, hash-verified

451/* Wrapper for feedReplicationBacklog() that takes Redis string objects
452 * as input. */
453void feedReplicationBacklogWithObject(robj *o) {
454 char llstr[LONG_STR_SIZE];
455 void *p;
456 size_t len;
457
458 if (o->encoding == OBJ_ENCODING_INT) {
459 len = ll2string(llstr,sizeof(llstr),(long)ptrFromObj(o));
460 p = llstr;
461 } else {
462 len = sdslen((sds)ptrFromObj(o));
463 p = ptrFromObj(o);
464 }
465 feedReplicationBacklog(p,len);
466}
467
468sds catCommandForAofAndActiveReplication(sds buf, struct redisCommand *cmd, robj **argv, int argc);
469

Callers 2

replicationFeedSlaveFunction · 0.85

Calls 4

ll2stringFunction · 0.85
ptrFromObjFunction · 0.85
sdslenFunction · 0.85
feedReplicationBacklogFunction · 0.85

Tested by

no test coverage detected