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
825e07f2
You need to sign in or sign up before continuing.
Commit
825e07f2
authored
Feb 22, 2013
by
antirez
Browse files
Cluster: if no previous config exists, create the myself node as master.
parent
f4093753
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
825e07f2
...
@@ -229,7 +229,8 @@ void clusterInit(void) {
...
@@ -229,7 +229,8 @@ void clusterInit(void) {
if
(
clusterLoadConfig
(
server
.
cluster_configfile
)
==
REDIS_ERR
)
{
if
(
clusterLoadConfig
(
server
.
cluster_configfile
)
==
REDIS_ERR
)
{
/* No configuration found. We will just use the random name provided
/* No configuration found. We will just use the random name provided
* by the createClusterNode() function. */
* by the createClusterNode() function. */
server
.
cluster
->
myself
=
createClusterNode
(
NULL
,
REDIS_NODE_MYSELF
);
server
.
cluster
->
myself
=
createClusterNode
(
NULL
,
REDIS_NODE_MYSELF
|
REDIS_NODE_MASTER
);
redisLog
(
REDIS_NOTICE
,
"No cluster configuration found, I'm %.40s"
,
redisLog
(
REDIS_NOTICE
,
"No cluster configuration found, I'm %.40s"
,
server
.
cluster
->
myself
->
name
);
server
.
cluster
->
myself
->
name
);
clusterAddNode
(
server
.
cluster
->
myself
);
clusterAddNode
(
server
.
cluster
->
myself
);
...
...
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