Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Turbo码先生
redis
提交
132be8ae
R
redis
项目概览
Turbo码先生
/
redis
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
132be8ae
编写于
8月 26, 2018
作者:
C
Chris Lamb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct "did not received" -> "did not receive" typos/grammar.
上级
46d89a9a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
10 addition
and
10 deletion
+10
-10
src/scripting.c
src/scripting.c
+1
-1
src/sentinel.c
src/sentinel.c
+3
-3
tests/sentinel/tests/00-base.tcl
tests/sentinel/tests/00-base.tcl
+2
-2
tests/sentinel/tests/01-conf-update.tcl
tests/sentinel/tests/01-conf-update.tcl
+2
-2
tests/sentinel/tests/02-slaves-reconf.tcl
tests/sentinel/tests/02-slaves-reconf.tcl
+1
-1
tests/sentinel/tests/05-manual.tcl
tests/sentinel/tests/05-manual.tcl
+1
-1
未找到文件。
src/scripting.c
浏览文件 @
132be8ae
...
...
@@ -1725,7 +1725,7 @@ int ldbRemoveChild(pid_t pid) {
return
0
;
}
/* Return the number of children we still did not receive
d
termination
/* Return the number of children we still did not receive termination
* acknowledge via wait() in the parent process. */
int
ldbPendingChildren
(
void
)
{
return
listLength
(
ldb
.
children
);
...
...
src/sentinel.c
浏览文件 @
132be8ae
...
...
@@ -2628,7 +2628,7 @@ int sentinelSendPing(sentinelRedisInstance *ri) {
ri
->
link
->
last_ping_time
=
mstime
();
/* We update the active ping time only if we received the pong for
* the previous ping, otherwise we are technically waiting since the
* first ping that did not receive
d
a reply. */
* first ping that did not receive a reply. */
if
(
ri
->
link
->
act_ping_time
==
0
)
ri
->
link
->
act_ping_time
=
ri
->
link
->
last_ping_time
;
return
1
;
...
...
@@ -3569,7 +3569,7 @@ void sentinelCheckSubjectivelyDown(sentinelRedisInstance *ri) {
(
mstime
()
-
ri
->
link
->
cc_conn_time
)
>
SENTINEL_MIN_LINK_RECONNECT_PERIOD
&&
ri
->
link
->
act_ping_time
!=
0
&&
/* There is a pending ping... */
/* The pending ping is delayed, and we did not receive
d
/* The pending ping is delayed, and we did not receive
* error replies as well. */
(
mstime
()
-
ri
->
link
->
act_ping_time
)
>
(
ri
->
down_after_period
/
2
)
&&
(
mstime
()
-
ri
->
link
->
last_pong_time
)
>
(
ri
->
down_after_period
/
2
))
...
...
@@ -3725,7 +3725,7 @@ void sentinelAskMasterStateToOtherSentinels(sentinelRedisInstance *master, int f
*
* 1) We believe it is down, or there is a failover in progress.
* 2) Sentinel is connected.
* 3) We did not receive
d
the info within SENTINEL_ASK_PERIOD ms. */
* 3) We did not receive the info within SENTINEL_ASK_PERIOD ms. */
if
((
master
->
flags
&
SRI_S_DOWN
)
==
0
)
continue
;
if
(
ri
->
link
->
disconnected
)
continue
;
if
(
!
(
flags
&
SENTINEL_ASK_FORCED
)
&&
...
...
tests/sentinel/tests/00-base.tcl
浏览文件 @
132be8ae
...
...
@@ -17,7 +17,7 @@ test "Basic failover works if the master is down" {
wait_for_condition 1000 50
{
[
lindex
[
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"At least one Sentinel did not receive
d
failover info"
fail
"At least one Sentinel did not receive failover info"
}
}
restart_instance redis $master_id
...
...
@@ -108,7 +108,7 @@ test "Failover works if we configure for absolute agreement" {
wait_for_condition 1000 50
{
[
lindex
[
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"At least one Sentinel did not receive
d
failover info"
fail
"At least one Sentinel did not receive failover info"
}
}
restart_instance redis $master_id
...
...
tests/sentinel/tests/01-conf-update.tcl
浏览文件 @
132be8ae
...
...
@@ -16,7 +16,7 @@ test "We can failover with Sentinel 1 crashed" {
wait_for_condition 1000 50
{
[
lindex
[
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"Sentinel
$id
did not receive
d
failover info"
fail
"Sentinel
$id
did not receive failover info"
}
}
}
...
...
@@ -30,7 +30,7 @@ test "After Sentinel 1 is restarted, its config gets updated" {
wait_for_condition 1000 50
{
[
lindex
[
S 1 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"Restarted Sentinel did not receive
d
failover info"
fail
"Restarted Sentinel did not receive failover info"
}
}
...
...
tests/sentinel/tests/02-slaves-reconf.tcl
浏览文件 @
132be8ae
...
...
@@ -36,7 +36,7 @@ proc 02_crash_and_failover {} {
wait_for_condition 1000 50
{
[
lindex
[
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"At least one Sentinel did not receive
d
failover info"
fail
"At least one Sentinel did not receive failover info"
}
}
restart_instance redis $master_id
...
...
tests/sentinel/tests/05-manual.tcl
浏览文件 @
132be8ae
...
...
@@ -12,7 +12,7 @@ test "Manual failover works" {
wait_for_condition 1000 50
{
[
lindex
[
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
1
]
!= $old_port
}
else
{
fail
"At least one Sentinel did not receive
d
failover info"
fail
"At least one Sentinel did not receive failover info"
}
}
set addr
[
S 0 SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录