Cluster refactor: Some code convention fixes

Signed-off-by: Josh Hershberg <yehoshua@redis.com>
This commit is contained in:
Josh Hershberg 2023-11-14 14:32:51 +02:00
parent 290f376429
commit eebb025826
2 changed files with 15 additions and 14 deletions

View File

@ -77,28 +77,29 @@ sds clusterGenNodeDescription(client *c, clusterNode *node, int tls_primary);
int clusterNodeCoversSlot(clusterNode *n, int slot);
int getNodeDefaultClientPort(clusterNode *n);
int clusterNodeIsMyself(clusterNode *n);
clusterNode* getMyClusterNode(void);
char* getMyClusterId(void);
clusterNode *getMyClusterNode(void);
char *getMyClusterId(void);
int getClusterSize(void);
char** getClusterNodesList(size_t *numnodes);
int handleDebugClusterCommand(client *c);
int clusterNodePending(clusterNode *node);
int clusterNodeIsMaster(clusterNode *n);
char* clusterNodeIp(clusterNode *node);
char **getClusterNodesList(size_t *numnodes);
int clusterNodeIsMaster(clusterNode *n);
char *clusterNodeIp(clusterNode *node);
int clusterNodeIsSlave(clusterNode *node);
clusterNode *clusterNodeGetSlaveof(clusterNode *node);
char* clusterNodeGetName(clusterNode *node);
char *clusterNodeGetName(clusterNode *node);
int clusterNodeTimedOut(clusterNode *node);
int clusterNodeIsFailing(clusterNode *node);
int clusterNodeIsNoFailover(clusterNode *node);
char* clusterNodeGetShardId(clusterNode *node);
char *clusterNodeGetShardId(clusterNode *node);
int clusterNodeNumSlaves(clusterNode *node);
clusterNode *clusterNodeGetSlave(clusterNode *node, int slave_idx);
clusterNode *getMigratingSlotDest(int slot);
clusterNode *getImportingSlotSource(int slot);
clusterNode *getNodeBySlot(int slot);
int clusterNodeClientPort(clusterNode *n, int use_tls);
char* clusterNodeHostname(clusterNode *node);
char *clusterNodeHostname(clusterNode *node);
const char *clusterNodePreferredEndpoint(clusterNode *n);
long long clusterNodeReplOffset(clusterNode *node);
clusterNode *clusterLookupNode(const char *name, int length);

View File

@ -5761,7 +5761,7 @@ int clusterNodeIsMyself(clusterNode *n) {
return n == server.cluster->myself;
}
clusterNode* getMyClusterNode(void) {
clusterNode *getMyClusterNode(void) {
return server.cluster->myself;
}
@ -5773,7 +5773,7 @@ int getClusterSize(void) {
return dictSize(server.cluster->nodes);
}
char** getClusterNodesList(size_t *numnodes) {
char **getClusterNodesList(size_t *numnodes) {
size_t count = dictSize(server.cluster->nodes);
char **ids = zmalloc((count+1)*CLUSTER_NAMELEN);
dictIterator *di = dictGetIterator(server.cluster->nodes);
@ -5836,7 +5836,7 @@ int clusterNodePending(clusterNode *node) {
return node->flags & (CLUSTER_NODE_NOADDR|CLUSTER_NODE_HANDSHAKE);
}
char* clusterNodeIp(clusterNode *node) {
char *clusterNodeIp(clusterNode *node) {
return node->ip;
}
@ -5848,7 +5848,7 @@ clusterNode *clusterNodeGetSlaveof(clusterNode *node) {
return node->slaveof;
}
char* clusterNodeGetName(clusterNode *node) {
char *clusterNodeGetName(clusterNode *node) {
return node->name;
}
@ -5874,7 +5874,7 @@ const char **clusterDebugCommandExtendedHelp(void) {
return help;
}
char* clusterNodeGetShardId(clusterNode *node) {
char *clusterNodeGetShardId(clusterNode *node) {
return node->shard_id;
}
@ -6326,7 +6326,7 @@ int clusterCommandSpecial(client *c) {
return 1;
}
const char** clusterCommandExtendedHelp(void) {
const char **clusterCommandExtendedHelp(void) {
static const char *help[] = {
"ADDSLOTS <slot> [<slot> ...]",
" Assign slots to current node.",
@ -6391,7 +6391,7 @@ clusterNode *getNodeBySlot(int slot) {
return server.cluster->slots[slot];
}
char* clusterNodeHostname(clusterNode *node) {
char *clusterNodeHostname(clusterNode *node) {
return node->hostname;
}