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

Function zrangeResultFinalizeStore

app/redis-6.2.6/src/t_zset.c:2975–2991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2973}
2974
2975static void zrangeResultFinalizeStore(zrange_result_handler *handler, size_t result_count)
2976{
2977 if (result_count) {
2978 setKey(handler->client, handler->client->db, handler->dstkey, handler->dstobj);
2979 addReplyLongLong(handler->client, result_count);
2980 notifyKeyspaceEvent(NOTIFY_ZSET, "zrangestore", handler->dstkey, handler->client->db->id);
2981 server.dirty++;
2982 } else {
2983 addReply(handler->client, shared.czero);
2984 if (dbDelete(handler->client->db, handler->dstkey)) {
2985 signalModifiedKey(handler->client, handler->client->db, handler->dstkey);
2986 notifyKeyspaceEvent(NOTIFY_GENERIC, "del", handler->dstkey, handler->client->db->id);
2987 server.dirty++;
2988 }
2989 }
2990 decrRefCount(handler->dstobj);
2991}
2992
2993/* Initialize the consumer interface type with the requested type. */
2994static void zrangeResultHandlerInit(zrange_result_handler *handler,

Callers

nothing calls this directly

Calls 7

setKeyFunction · 0.85
addReplyLongLongFunction · 0.85
notifyKeyspaceEventFunction · 0.85
addReplyFunction · 0.85
dbDeleteFunction · 0.85
signalModifiedKeyFunction · 0.85
decrRefCountFunction · 0.85

Tested by

no test coverage detected