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
6e326c81
Commit
6e326c81
authored
May 31, 2011
by
antirez
Browse files
prepare to cherry pick variadic ZADD without conflicts
parent
83533b62
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_zset.c
View file @
6e326c81
...
...
@@ -859,7 +859,7 @@ void zaddGenericCommand(redisClient *c, int incr) {
zobj
->
ptr
=
zzlDelete
(
zobj
->
ptr
,
eptr
);
zobj
->
ptr
=
zzlInsert
(
zobj
->
ptr
,
ele
,
score
);
touchWatch
edKey
(
c
->
db
,
key
);
signalModifi
edKey
(
c
->
db
,
key
);
server
.
dirty
++
;
}
...
...
@@ -876,7 +876,7 @@ void zaddGenericCommand(redisClient *c, int incr) {
if
(
sdslen
(
ele
->
ptr
)
>
server
.
zset_max_ziplist_value
)
zsetConvert
(
zobj
,
REDIS_ENCODING_SKIPLIST
);
touchWatch
edKey
(
c
->
db
,
key
);
signalModifi
edKey
(
c
->
db
,
key
);
server
.
dirty
++
;
if
(
incr
)
/* ZINCRBY */
...
...
@@ -914,7 +914,7 @@ void zaddGenericCommand(redisClient *c, int incr) {
incrRefCount
(
curobj
);
/* Re-inserted in skiplist. */
dictGetEntryVal
(
de
)
=
&
znode
->
score
;
/* Update score ptr. */
touchWatch
edKey
(
c
->
db
,
key
);
signalModifi
edKey
(
c
->
db
,
key
);
server
.
dirty
++
;
}
...
...
@@ -928,7 +928,7 @@ void zaddGenericCommand(redisClient *c, int incr) {
redisAssert
(
dictAdd
(
zs
->
dict
,
ele
,
&
znode
->
score
)
==
DICT_OK
);
incrRefCount
(
ele
);
/* Added to dictionary. */
touchWatch
edKey
(
c
->
db
,
key
);
signalModifi
edKey
(
c
->
db
,
key
);
server
.
dirty
++
;
if
(
incr
)
/* ZINCRBY */
...
...
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