Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
f0266532
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
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,发现更多精彩内容 >>
提交
f0266532
编写于
11月 01, 2012
作者:
Y
Yecheng Fu
提交者:
antirez
11月 01, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typo in comments (redis.c, networking.c)
上级
2ea41242
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
src/networking.c
src/networking.c
+6
-6
src/redis.c
src/redis.c
+4
-4
未找到文件。
src/networking.c
浏览文件 @
f0266532
...
@@ -489,8 +489,8 @@ void copyClientOutputBuffer(redisClient *dst, redisClient *src) {
...
@@ -489,8 +489,8 @@ void copyClientOutputBuffer(redisClient *dst, redisClient *src) {
static
void
acceptCommonHandler
(
int
fd
,
int
flags
)
{
static
void
acceptCommonHandler
(
int
fd
,
int
flags
)
{
redisClient
*
c
;
redisClient
*
c
;
if
((
c
=
createClient
(
fd
))
==
NULL
)
{
if
((
c
=
createClient
(
fd
))
==
NULL
)
{
redisLog
(
REDIS_WARNING
,
"Error allocating resoures for the client"
);
redisLog
(
REDIS_WARNING
,
"Error allocating resour
c
es for the client"
);
close
(
fd
);
/* May be already closed, just i
ng
ore errors */
close
(
fd
);
/* May be already closed, just i
gn
ore errors */
return
;
return
;
}
}
/* If maxclient directive is set and this is one client more... close the
/* If maxclient directive is set and this is one client more... close the
...
@@ -991,9 +991,9 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
...
@@ -991,9 +991,9 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
server
.
current_client
=
c
;
server
.
current_client
=
c
;
readlen
=
REDIS_IOBUF_LEN
;
readlen
=
REDIS_IOBUF_LEN
;
/* If this is a multi bulk request, and we are processing a bulk reply
/* If this is a multi bulk request, and we are processing a bulk reply
* that is large enough, try to maximize the probabilty that the query
* that is large enough, try to maximize the probabil
i
ty that the query
* buffer contains ex
ca
tly the SDS string representing the object, even
* buffer contains ex
ac
tly the SDS string representing the object, even
* at the risk of requring more read(2) calls. This way the function
* at the risk of requ
i
ring more read(2) calls. This way the function
* processMultiBulkBuffer() can avoid copying buffers to create the
* processMultiBulkBuffer() can avoid copying buffers to create the
* Redis Object representing the argument. */
* Redis Object representing the argument. */
if
(
c
->
reqtype
==
REDIS_REQ_MULTIBULK
&&
c
->
multibulklen
&&
c
->
bulklen
!=
-
1
if
(
c
->
reqtype
==
REDIS_REQ_MULTIBULK
&&
c
->
multibulklen
&&
c
->
bulklen
!=
-
1
...
@@ -1231,7 +1231,7 @@ unsigned long getClientOutputBufferMemoryUsage(redisClient *c) {
...
@@ -1231,7 +1231,7 @@ unsigned long getClientOutputBufferMemoryUsage(redisClient *c) {
return
c
->
reply_bytes
+
(
list_item_size
*
listLength
(
c
->
reply
));
return
c
->
reply_bytes
+
(
list_item_size
*
listLength
(
c
->
reply
));
}
}
/* Get the class of a client, used in order to en
v
orce limits to different
/* Get the class of a client, used in order to en
f
orce limits to different
* classes of clients.
* classes of clients.
*
*
* The function will return one of the following:
* The function will return one of the following:
...
...
src/redis.c
浏览文件 @
f0266532
...
@@ -1548,7 +1548,7 @@ void call(redisClient *c, int flags) {
...
@@ -1548,7 +1548,7 @@ void call(redisClient *c, int flags) {
}
}
/* If this function gets called we already read a whole
/* If this function gets called we already read a whole
* command, argments are in the client argv/argc fields.
* command, arg
u
ments are in the client argv/argc fields.
* processCommand() execute the command or prepare the
* processCommand() execute the command or prepare the
* server for a bulk read from the client.
* server for a bulk read from the client.
*
*
...
@@ -2229,7 +2229,7 @@ void infoCommand(redisClient *c) {
...
@@ -2229,7 +2229,7 @@ void infoCommand(redisClient *c) {
}
}
void
monitorCommand
(
redisClient
*
c
)
{
void
monitorCommand
(
redisClient
*
c
)
{
/* ignore MONITOR if aleady slave or in monitor mode */
/* ignore MONITOR if al
r
eady slave or in monitor mode */
if
(
c
->
flags
&
REDIS_SLAVE
)
return
;
if
(
c
->
flags
&
REDIS_SLAVE
)
return
;
c
->
flags
|=
(
REDIS_SLAVE
|
REDIS_MONITOR
);
c
->
flags
|=
(
REDIS_SLAVE
|
REDIS_MONITOR
);
...
@@ -2328,7 +2328,7 @@ int freeMemoryIfNeeded(void) {
...
@@ -2328,7 +2328,7 @@ int freeMemoryIfNeeded(void) {
de
=
dictGetRandomKey
(
dict
);
de
=
dictGetRandomKey
(
dict
);
thiskey
=
dictGetKey
(
de
);
thiskey
=
dictGetKey
(
de
);
/* When policy is volatile-lru we need an additonal lookup
/* When policy is volatile-lru we need an addit
i
onal lookup
* to locate the real key, as dict is set to db->expires. */
* to locate the real key, as dict is set to db->expires. */
if
(
server
.
maxmemory_policy
==
REDIS_MAXMEMORY_VOLATILE_LRU
)
if
(
server
.
maxmemory_policy
==
REDIS_MAXMEMORY_VOLATILE_LRU
)
de
=
dictFind
(
db
->
dict
,
thiskey
);
de
=
dictFind
(
db
->
dict
,
thiskey
);
...
@@ -2631,7 +2631,7 @@ int main(int argc, char **argv) {
...
@@ -2631,7 +2631,7 @@ int main(int argc, char **argv) {
redisAsciiArt
();
redisAsciiArt
();
if
(
!
server
.
sentinel_mode
)
{
if
(
!
server
.
sentinel_mode
)
{
/* Things only needed when not runni
gn
in Sentinel mode. */
/* Things only needed when not runni
ng
in Sentinel mode. */
redisLog
(
REDIS_WARNING
,
"Server started, Redis version "
REDIS_VERSION
);
redisLog
(
REDIS_WARNING
,
"Server started, Redis version "
REDIS_VERSION
);
#ifdef __linux__
#ifdef __linux__
linuxOvercommitMemoryWarning
();
linuxOvercommitMemoryWarning
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录