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

Function getdelCommand

src/t_string.cpp:407–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407void getdelCommand(client *c) {
408 if (getGenericCommand(c) == C_ERR) return;
409 int deleted = g_pserver->lazyfree_lazy_user_del ? dbAsyncDelete(c->db, c->argv[1]) :
410 dbSyncDelete(c->db, c->argv[1]);
411 if (deleted) {
412 /* Propagate as DEL/UNLINK command */
413 robj *aux = g_pserver->lazyfree_lazy_user_del ? shared.unlink : shared.del;
414 rewriteClientCommandVector(c,2,aux,c->argv[1]);
415 signalModifiedKey(c, c->db, c->argv[1]);
416 notifyKeyspaceEvent(NOTIFY_GENERIC, "del", c->argv[1], c->db->id);
417 g_pserver->dirty++;
418 }
419}
420
421void getsetCommand(client *c) {
422 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