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

Function feedReplicationBacklogWithObject

app/redis-6.2.6/src/replication.c:186–199  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

184/* Wrapper for feedReplicationBacklog() that takes Redis string objects
185 * as input. */
186void feedReplicationBacklogWithObject(robj *o) {
187 char llstr[LONG_STR_SIZE];
188 void *p;
189 size_t len;
190
191 if (o->encoding == OBJ_ENCODING_INT) {
192 len = ll2string(llstr,sizeof(llstr),(long)o->ptr);
193 p = llstr;
194 } else {
195 len = sdslen(o->ptr);
196 p = o->ptr;
197 }
198 feedReplicationBacklog(p,len);
199}
200
201int canFeedReplicaReplBuffer(client *replica) {
202 /* Don't feed replicas that only want the RDB. */

Callers 1

replicationFeedSlavesFunction · 0.85

Calls 3

ll2stringFunction · 0.85
sdslenFunction · 0.85
feedReplicationBacklogFunction · 0.85

Tested by

no test coverage detected