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

Function getdelCommand

app/redis-6.2.6/src/t_string.c:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399void getdelCommand(client *c) {
400 if (getGenericCommand(c) == C_ERR) return;
401 int deleted = server.lazyfree_lazy_user_del ? dbAsyncDelete(c->db, c->argv[1]) :
402 dbSyncDelete(c->db, c->argv[1]);
403 if (deleted) {
404 /* Propagate as DEL/UNLINK command */
405 robj *aux = server.lazyfree_lazy_user_del ? shared.unlink : shared.del;
406 rewriteClientCommandVector(c,2,aux,c->argv[1]);
407 signalModifiedKey(c, c->db, c->argv[1]);
408 notifyKeyspaceEvent(NOTIFY_GENERIC, "del", c->argv[1], c->db->id);
409 server.dirty++;
410 }
411}
412
413void getsetCommand(client *c) {
414 if (getGenericCommand(c) == C_ERR) return;

Callers

nothing calls this directly

Calls 6

getGenericCommandFunction · 0.85
dbAsyncDeleteFunction · 0.85
dbSyncDeleteFunction · 0.85
signalModifiedKeyFunction · 0.85
notifyKeyspaceEventFunction · 0.85

Tested by

no test coverage detected