Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ef4f25ff
Commit
ef4f25ff
authored
Apr 09, 2013
by
antirez
Browse files
Cluster: configdigest field no longer used. Removed.
parent
f09b2508
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
ef4f25ff
...
@@ -350,8 +350,6 @@ clusterNode *createClusterNode(char *nodename, int flags) {
...
@@ -350,8 +350,6 @@ clusterNode *createClusterNode(char *nodename, int flags) {
node->slaveof = NULL;
node->slaveof = NULL;
node->ping_sent = node->pong_received = 0;
node->ping_sent = node->pong_received = 0;
node->fail_time = 0;
node->fail_time = 0;
node
->
configdigest
=
NULL
;
node
->
configdigest_ts
=
0
;
node->link = NULL;
node->link = NULL;
memset(node->ip,0,sizeof(node->ip));
memset(node->ip,0,sizeof(node->ip));
node->port = 0;
node->port = 0;
...
@@ -1171,7 +1169,6 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
...
@@ -1171,7 +1169,6 @@ void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
hdr->port = htons(server.port);
hdr->port = htons(server.port);
hdr->flags = htons(server.cluster->myself->flags);
hdr->flags = htons(server.cluster->myself->flags);
hdr->state = server.cluster->state;
hdr->state = server.cluster->state;
memset
(
hdr
->
configdigest
,
0
,
32
);
/* FIXME: set config digest */
if (type == CLUSTERMSG_TYPE_FAIL) {
if (type == CLUSTERMSG_TYPE_FAIL) {
totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
...
...
src/redis.h
View file @
ef4f25ff
...
@@ -572,8 +572,6 @@ struct clusterNode {
...
@@ -572,8 +572,6 @@ struct clusterNode {
time_t
ping_sent
;
/* Unix time we sent latest ping */
time_t
ping_sent
;
/* Unix time we sent latest ping */
time_t
pong_received
;
/* Unix time we received the pong */
time_t
pong_received
;
/* Unix time we received the pong */
time_t
fail_time
;
/* Unix time when FAIL flag was set */
time_t
fail_time
;
/* Unix time when FAIL flag was set */
char
*
configdigest
;
/* Configuration digest of this node */
time_t
configdigest_ts
;
/* Configuration digest timestamp */
char
ip
[
16
];
/* Latest known IP address of this node */
char
ip
[
16
];
/* Latest known IP address of this node */
int
port
;
/* Latest known port of this node */
int
port
;
/* Latest known port of this node */
clusterLink
*
link
;
/* TCP/IP link with this node */
clusterLink
*
link
;
/* TCP/IP link with this node */
...
@@ -657,11 +655,11 @@ typedef struct {
...
@@ -657,11 +655,11 @@ typedef struct {
char
sender
[
REDIS_CLUSTER_NAMELEN
];
/* Name of the sender node */
char
sender
[
REDIS_CLUSTER_NAMELEN
];
/* Name of the sender node */
unsigned
char
myslots
[
REDIS_CLUSTER_SLOTS
/
8
];
unsigned
char
myslots
[
REDIS_CLUSTER_SLOTS
/
8
];
char
slaveof
[
REDIS_CLUSTER_NAMELEN
];
char
slaveof
[
REDIS_CLUSTER_NAMELEN
];
char
configdigest
[
32
];
char
notused1
[
32
];
/* 32 bytes reserved for future usage. */
uint16_t
port
;
/* Sender TCP base port */
uint16_t
port
;
/* Sender TCP base port */
uint16_t
flags
;
/* Sender node flags */
uint16_t
flags
;
/* Sender node flags */
unsigned
char
state
;
/* Cluster state from the POV of the sender */
unsigned
char
state
;
/* Cluster state from the POV of the sender */
unsigned
char
notused
[
3
];
/* Reserved for future use. For alignment. */
unsigned
char
notused
2
[
3
];
/* Reserved for future use. For alignment. */
union
clusterMsgData
data
;
union
clusterMsgData
data
;
}
clusterMsg
;
}
clusterMsg
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment