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

Function dumpCommand

app/redis-6.2.6/src/cluster.c:5097–5113  ·  view source on GitHub ↗

DUMP keyname * DUMP is actually not used by Redis Cluster but it is the obvious * complement of RESTORE and can be useful for different applications. */

Source from the content-addressed store, hash-verified

5095 * DUMP is actually not used by Redis Cluster but it is the obvious
5096 * complement of RESTORE and can be useful for different applications. */
5097void dumpCommand(client *c) {
5098 robj *o;
5099 rio payload;
5100
5101 /* Check if the key is here. */
5102 if ((o = lookupKeyRead(c->db,c->argv[1])) == NULL) {
5103 addReplyNull(c);
5104 return;
5105 }
5106
5107 /* Create the DUMP encoded representation. */
5108 createDumpPayload(&payload,o,c->argv[1]);
5109
5110 /* Transfer to the client */
5111 addReplyBulkSds(c,payload.io.buffer.ptr);
5112 return;
5113}
5114
5115/* RESTORE key ttl serialized-value [REPLACE] */
5116void restoreCommand(client *c) {

Callers

nothing calls this directly

Calls 4

lookupKeyReadFunction · 0.85
addReplyNullFunction · 0.85
createDumpPayloadFunction · 0.85
addReplyBulkSdsFunction · 0.85

Tested by

no test coverage detected