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
8b201128
Commit
8b201128
authored
Mar 23, 2018
by
antirez
Browse files
Merge branch 'unstable' of github.com:/antirez/redis into unstable
parents
1392c83f
e08d6bb3
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/anet.c
View file @
8b201128
...
...
@@ -484,7 +484,7 @@ static int _anetTcpServer(char *err, int port, char *bindaddr, int af, int backl
if
(
af
==
AF_INET6
&&
anetV6Only
(
err
,
s
)
==
ANET_ERR
)
goto
error
;
if
(
anetSetReuseAddr
(
err
,
s
)
==
ANET_ERR
)
goto
error
;
if
(
anetListen
(
err
,
s
,
p
->
ai_addr
,
p
->
ai_addrlen
,
backlog
)
==
ANET_ERR
)
goto
error
;
if
(
anetListen
(
err
,
s
,
p
->
ai_addr
,
p
->
ai_addrlen
,
backlog
)
==
ANET_ERR
)
s
=
ANET_ERR
;
goto
end
;
}
if
(
p
==
NULL
)
{
...
...
src/blocked.c
View file @
8b201128
...
...
@@ -283,6 +283,7 @@ void handleClientsBlockedOnKeys(void) {
if
(
listTypeLength
(
o
)
==
0
)
{
dbDelete
(
rl
->
db
,
rl
->
key
);
notifyKeyspaceEvent
(
NOTIFY_GENERIC
,
"del"
,
rl
->
key
,
rl
->
db
->
id
);
}
/* We don't call signalModifiedKey() as it was already called
* when an element was pushed on the list. */
...
...
src/cluster.c
View file @
8b201128
...
...
@@ -600,8 +600,7 @@ clusterLink *createClusterLink(clusterNode *node) {
* with this link will have the 'link' field set to NULL. */
void
freeClusterLink
(
clusterLink
*
link
)
{
if
(
link
->
fd
!=
-
1
)
{
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_WRITABLE
);
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_READABLE
);
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_READABLE
|
AE_WRITABLE
);
}
sdsfree
(
link
->
sndbuf
);
sdsfree
(
link
->
rcvbuf
);
...
...
src/db.c
View file @
8b201128
...
...
@@ -187,9 +187,6 @@ void dbOverwrite(redisDb *db, robj *key, robj *val) {
int
saved_lru
=
old
->
lru
;
dictReplace
(
db
->
dict
,
key
->
ptr
,
val
);
val
->
lru
=
saved_lru
;
/* LFU should be not only copied but also updated
* when a key is overwritten. */
updateLFU
(
val
);
}
else
{
dictReplace
(
db
->
dict
,
key
->
ptr
,
val
);
}
...
...
@@ -1359,7 +1356,7 @@ int *georadiusGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numk
for
(
i
=
5
;
i
<
argc
;
i
++
)
{
char
*
arg
=
argv
[
i
]
->
ptr
;
/* For the case when user specifies both "store" and "storedist" options, the
* second key specified would override the first key. This behavior is kept
* second key specified would override the first key. This behavior is kept
* the same as in georadiusCommand method.
*/
if
((
!
strcasecmp
(
arg
,
"store"
)
||
!
strcasecmp
(
arg
,
"storedist"
))
&&
((
i
+
1
)
<
argc
))
{
...
...
@@ -1380,7 +1377,7 @@ int *georadiusGetKeys(struct redisCommand *cmd, robj **argv, int argc, int *numk
if
(
num
>
1
)
{
keys
[
1
]
=
stored_key
;
}
*
numkeys
=
num
;
*
numkeys
=
num
;
return
keys
;
}
...
...
src/object.c
View file @
8b201128
...
...
@@ -113,7 +113,7 @@ robj *createEmbeddedStringObject(const char *ptr, size_t len) {
* OBJ_ENCODING_EMBSTR_SIZE_LIMIT, otherwise the RAW encoding is
* used.
*
* The current limit of
39
is chosen so that the biggest string object
* The current limit of
44
is chosen so that the biggest string object
* we allocate as EMBSTR will still fit into the 64 byte arena of jemalloc. */
#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44
robj
*
createStringObject
(
const
char
*
ptr
,
size_t
len
)
{
...
...
src/t_list.c
View file @
8b201128
...
...
@@ -639,6 +639,10 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
addReplyMultiBulkLen
(
receiver
,
2
);
addReplyBulk
(
receiver
,
key
);
addReplyBulk
(
receiver
,
value
);
/* Notify event. */
char
*
event
=
(
where
==
LIST_HEAD
)
?
"lpop"
:
"rpop"
;
notifyKeyspaceEvent
(
NOTIFY_LIST
,
event
,
key
,
receiver
->
db
->
id
);
}
else
{
/* BRPOPLPUSH */
robj
*
dstobj
=
...
...
@@ -663,6 +667,9 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
db
->
id
,
argv
,
3
,
PROPAGATE_AOF
|
PROPAGATE_REPL
);
/* Notify event ("lpush" was notified by rpoplpushHandlePush). */
notifyKeyspaceEvent
(
NOTIFY_LIST
,
"rpop"
,
key
,
receiver
->
db
->
id
);
}
else
{
/* BRPOPLPUSH failed because of wrong
* destination type. */
...
...
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