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

Function delGenericCommand

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

This command implements DEL and LAZYDEL. */

Source from the content-addressed store, hash-verified

680
681/* This command implements DEL and LAZYDEL. */
682void delGenericCommand(client *c, int lazy) {
683 int numdel = 0, j;
684
685 for (j = 1; j < c->argc; j++) {
686 expireIfNeeded(c->db,c->argv[j]);
687 int deleted = lazy ? dbAsyncDelete(c->db,c->argv[j]) :
688 dbSyncDelete(c->db,c->argv[j]);
689 if (deleted) {
690 signalModifiedKey(c,c->db,c->argv[j]);
691 notifyKeyspaceEvent(NOTIFY_GENERIC,
692 "del",c->argv[j],c->db->id);
693 server.dirty++;
694 numdel++;
695 }
696 }
697 addReplyLongLong(c,numdel);
698}
699
700void delCommand(client *c) {
701 delGenericCommand(c,server.lazyfree_lazy_user_del);

Callers 2

delCommandFunction · 0.85
unlinkCommandFunction · 0.85

Calls 6

expireIfNeededFunction · 0.85
dbAsyncDeleteFunction · 0.85
dbSyncDeleteFunction · 0.85
signalModifiedKeyFunction · 0.85
notifyKeyspaceEventFunction · 0.85
addReplyLongLongFunction · 0.85

Tested by

no test coverage detected