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
de035c94
Unverified
Commit
de035c94
authored
Jun 05, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 05, 2019
Browse files
Merge pull request #6148 from artix75/redis_bm_dev
Redis Benchmark: prevent CONFIG failure from exiting program
parents
fd0ee469
d3ed53f1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
de035c94
...
@@ -1540,7 +1540,10 @@ int main(int argc, const char **argv) {
...
@@ -1540,7 +1540,10 @@ int main(int argc, const char **argv) {
if
(
node
->
name
)
printf
(
"%s "
,
node
->
name
);
if
(
node
->
name
)
printf
(
"%s "
,
node
->
name
);
printf
(
"%s:%d
\n
"
,
node
->
ip
,
node
->
port
);
printf
(
"%s:%d
\n
"
,
node
->
ip
,
node
->
port
);
node
->
redis_config
=
getRedisConfig
(
node
->
ip
,
node
->
port
,
NULL
);
node
->
redis_config
=
getRedisConfig
(
node
->
ip
,
node
->
port
,
NULL
);
if
(
node
->
redis_config
==
NULL
)
exit
(
1
);
if
(
node
->
redis_config
==
NULL
)
{
fprintf
(
stderr
,
"WARN: could not fetch node CONFIG %s:%d
\n
"
,
node
->
ip
,
node
->
port
);
}
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
/* Automatically set thread number to node count if not specified
/* Automatically set thread number to node count if not specified
...
@@ -1550,7 +1553,8 @@ int main(int argc, const char **argv) {
...
@@ -1550,7 +1553,8 @@ int main(int argc, const char **argv) {
}
else
{
}
else
{
config
.
redis_config
=
config
.
redis_config
=
getRedisConfig
(
config
.
hostip
,
config
.
hostport
,
config
.
hostsocket
);
getRedisConfig
(
config
.
hostip
,
config
.
hostport
,
config
.
hostsocket
);
if
(
config
.
redis_config
==
NULL
)
exit
(
1
);
if
(
config
.
redis_config
==
NULL
)
fprintf
(
stderr
,
"WARN: could not fetch server CONFIG
\n
"
);
}
}
if
(
config
.
num_threads
>
0
)
{
if
(
config
.
num_threads
>
0
)
{
...
...
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