Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
hanoi2005
redis
提交
49629a2e
R
redis
项目概览
hanoi2005
/
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,发现更多精彩内容 >>
提交
49629a2e
编写于
10月 27, 2014
作者:
A
antirez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Log slave ip:port in more log messages.
上级
081eeb9f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
6 deletion
+11
-6
src/replication.c
src/replication.c
+11
-6
未找到文件。
src/replication.c
浏览文件 @
49629a2e
...
...
@@ -368,7 +368,8 @@ int masterTryPartialResynchronization(redisClient *c) {
"Runid mismatch (Client asked for '%s', I'm '%s')"
,
master_runid
,
server
.
runid
);
}
else
{
redisLog
(
REDIS_NOTICE
,
"Full resync requested by slave."
);
redisLog
(
REDIS_NOTICE
,
"Full resync requested by slave %s"
,
replicationGetSlaveName
(
c
));
}
goto
need_full_resync
;
}
...
...
@@ -381,10 +382,10 @@ int masterTryPartialResynchronization(redisClient *c) {
psync_offset
>
(
server
.
repl_backlog_off
+
server
.
repl_backlog_histlen
))
{
redisLog
(
REDIS_NOTICE
,
"Unable to partial resync with
the slave for lack of backlog (Slave request was: %lld)."
,
psync_offset
);
"Unable to partial resync with
slave %s for lack of backlog (Slave request was: %lld)."
,
replicationGetSlaveName
(
c
)
,
psync_offset
);
if
(
psync_offset
>
server
.
master_repl_offset
)
{
redisLog
(
REDIS_WARNING
,
"Warning: slave
tried to PSYNC with an offset that is greater than the master replication offset."
);
"Warning: slave
%s tried to PSYNC with an offset that is greater than the master replication offset."
,
replicationGetSlaveName
(
c
)
);
}
goto
need_full_resync
;
}
...
...
@@ -407,7 +408,9 @@ int masterTryPartialResynchronization(redisClient *c) {
}
psync_len
=
addReplyReplicationBacklog
(
c
,
psync_offset
);
redisLog
(
REDIS_NOTICE
,
"Partial resynchronization request accepted. Sending %lld bytes of backlog starting from offset %lld."
,
psync_len
,
psync_offset
);
"Partial resynchronization request from %s accepted. Sending %lld bytes of backlog starting from offset %lld."
,
replicationGetSlaveName
(
c
),
psync_len
,
psync_offset
);
/* Note that we don't need to set the selected DB at server.slaveseldb
* to -1 to force the master to emit SELECT, since the slave already
* has this state from the previous connection with the master. */
...
...
@@ -474,7 +477,8 @@ void syncCommand(redisClient *c) {
return
;
}
redisLog
(
REDIS_NOTICE
,
"Slave asks for synchronization"
);
redisLog
(
REDIS_NOTICE
,
"Slave %s asks for synchronization"
,
replicationGetSlaveName
(
c
));
/* Try a partial resynchronization if this is a PSYNC command.
* If it fails, we continue with usual full resynchronization, however
...
...
@@ -744,7 +748,8 @@ void updateSlavesWaitingBgsave(int bgsaveerr, int type) {
if
(
type
==
REDIS_RDB_CHILD_TYPE_SOCKET
)
{
putSlaveOnline
(
slave
);
redisLog
(
REDIS_NOTICE
,
"Synchronization with slave succeeded (socket)"
);
"Synchronization with slave %s succeeded (socket)"
,
replicationGetSlaveName
(
slave
));
}
else
{
if
(
bgsaveerr
!=
REDIS_OK
)
{
freeClient
(
slave
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录