Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Turbo码先生
redis
提交
8105f91a
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,发现更多精彩内容 >>
提交
8105f91a
编写于
1月 10, 2020
作者:
A
antirez
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'unstable' of github.com:/antirez/redis into unstable
上级
9466dae4
b8b8dd5c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
2 deletion
+9
-2
redis.conf
redis.conf
+1
-1
src/db.c
src/db.c
+1
-1
src/replication.c
src/replication.c
+7
-0
未找到文件。
redis.conf
浏览文件 @
8105f91a
...
...
@@ -197,7 +197,7 @@ tcp-keepalive 300
# When choosing a cipher, use the server's preference instead of the client
# preference. By default, the server follows the client's preference.
#
# tls-prefer-server-cipher yes
# tls-prefer-server-cipher
s
yes
################################# GENERAL #####################################
...
...
src/db.c
浏览文件 @
8105f91a
...
...
@@ -602,7 +602,7 @@ void keysCommand(client *c) {
void
*
replylen
=
addReplyDeferredLen
(
c
);
di
=
dictGetSafeIterator
(
c
->
db
->
dict
);
allkeys
=
(
pattern
[
0
]
==
'*'
&&
p
attern
[
1
]
==
'\0'
);
allkeys
=
(
pattern
[
0
]
==
'*'
&&
p
len
==
1
);
while
((
de
=
dictNext
(
di
))
!=
NULL
)
{
sds
key
=
dictGetKey
(
de
);
robj
*
keyobj
;
...
...
src/replication.c
浏览文件 @
8105f91a
...
...
@@ -31,6 +31,7 @@
#include "server.h"
#include "cluster.h"
#include "bio.h"
#include <sys/time.h>
#include <unistd.h>
...
...
@@ -1616,14 +1617,20 @@ void readSyncBulkPayload(connection *conn) {
killRDBChild
();
}
/* Rename rdb like renaming rewrite aof asynchronously. */
int
old_rdb_fd
=
open
(
server
.
rdb_filename
,
O_RDONLY
|
O_NONBLOCK
);
if
(
rename
(
server
.
repl_transfer_tmpfile
,
server
.
rdb_filename
)
==
-
1
)
{
serverLog
(
LL_WARNING
,
"Failed trying to rename the temp DB into %s in "
"MASTER <-> REPLICA synchronization: %s"
,
server
.
rdb_filename
,
strerror
(
errno
));
cancelReplicationHandshake
();
if
(
old_rdb_fd
!=
-
1
)
close
(
old_rdb_fd
);
return
;
}
/* Close old rdb asynchronously. */
if
(
old_rdb_fd
!=
-
1
)
bioCreateBackgroundJob
(
BIO_CLOSE_FILE
,(
void
*
)(
long
)
old_rdb_fd
,
NULL
,
NULL
);
if
(
rdbLoad
(
server
.
rdb_filename
,
&
rsi
,
RDBFLAGS_REPLICATION
)
!=
C_OK
)
{
serverLog
(
LL_WARNING
,
"Failed trying to load the MASTER synchronization "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录