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

Function clusterManagerGetNodeRDBFilename

src/redis-cli.c:2457–2465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2455}
2456
2457static sds clusterManagerGetNodeRDBFilename(clusterManagerNode *node) {
2458 assert(config.cluster_manager_command.backup_dir);
2459 sds filename = sdsnew(config.cluster_manager_command.backup_dir);
2460 if (filename[sdslen(filename) - 1] != '/')
2461 filename = sdscat(filename, "/");
2462 filename = sdscatprintf(filename, "redis-node-%s-%d-%s.rdb", node->ip,
2463 node->port, node->name);
2464 return filename;
2465}
2466
2467/* Check whether reply is NULL or its type is REDIS_REPLY_ERROR. In the
2468 * latest case, if the 'err' arg is not NULL, it gets allocated with a copy

Callers 1

getRDBFunction · 0.85

Calls 4

sdsnewFunction · 0.85
sdslenFunction · 0.85
sdscatFunction · 0.85
sdscatprintfFunction · 0.85

Tested by

no test coverage detected