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

Function SentReplyOnKeyMiss

app/redis-6.2.6/src/db.c:168–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 return lookupKeyWriteWithFlags(db, key, LOOKUP_NONE);
167}
168void SentReplyOnKeyMiss(client *c, robj *reply){
169 serverAssert(sdsEncodedObject(reply));
170 sds rep = reply->ptr;
171 if (sdslen(rep) > 1 && rep[0] == '-'){
172 addReplyErrorObject(c, reply);
173 } else {
174 addReply(c,reply);
175 }
176}
177robj *lookupKeyReadOrReply(client *c, robj *key, robj *reply) {
178 robj *o = lookupKeyRead(c->db, key);
179 if (!o) SentReplyOnKeyMiss(c, reply);

Callers 3

lookupKeyReadOrReplyFunction · 0.85
lookupKeyWriteOrReplyFunction · 0.85

Calls 3

sdslenFunction · 0.85
addReplyErrorObjectFunction · 0.85
addReplyFunction · 0.85

Tested by

no test coverage detected