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

Function clusterManagerNewNode

app/redis-6.2.6/src/redis-cli.c:2724–2747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2722}
2723
2724static clusterManagerNode *clusterManagerNewNode(char *ip, int port) {
2725 clusterManagerNode *node = zmalloc(sizeof(*node));
2726 node->context = NULL;
2727 node->name = NULL;
2728 node->ip = ip;
2729 node->port = port;
2730 node->current_epoch = 0;
2731 node->ping_sent = 0;
2732 node->ping_recv = 0;
2733 node->flags = 0;
2734 node->flags_str = NULL;
2735 node->replicate = NULL;
2736 node->dirty = 0;
2737 node->friends = NULL;
2738 node->migrating = NULL;
2739 node->importing = NULL;
2740 node->migrating_count = 0;
2741 node->importing_count = 0;
2742 node->replicas_count = 0;
2743 node->weight = 1.0f;
2744 node->balance = 0;
2745 clusterManagerNodeResetSlots(node);
2746 return node;
2747}
2748
2749static sds clusterManagerGetNodeRDBFilename(clusterManagerNode *node) {
2750 assert(config.cluster_manager_command.backup_dir);

Calls 2

zmallocFunction · 0.85

Tested by

no test coverage detected