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
73fac227
Commit
73fac227
authored
Oct 20, 2011
by
antirez
Browse files
use signalModifiedKey to set the key as dirty in the context of WATCH for both MIGRATE and RESTORE.
parent
34296ae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
73fac227
...
@@ -1506,6 +1506,7 @@ void restoreCommand(redisClient *c) {
...
@@ -1506,6 +1506,7 @@ void restoreCommand(redisClient *c) {
/* Create the key and set the TTL if any */
/* Create the key and set the TTL if any */
dbAdd
(
c
->
db
,
c
->
argv
[
1
],
obj
);
dbAdd
(
c
->
db
,
c
->
argv
[
1
],
obj
);
if
(
ttl
)
setExpire
(
c
->
db
,
c
->
argv
[
1
],
time
(
NULL
)
+
ttl
);
if
(
ttl
)
setExpire
(
c
->
db
,
c
->
argv
[
1
],
time
(
NULL
)
+
ttl
);
signalModifiedKey
(
c
->
db
,
c
->
argv
[
1
]);
addReply
(
c
,
shared
.
ok
);
addReply
(
c
,
shared
.
ok
);
server
.
dirty
++
;
server
.
dirty
++
;
}
}
...
@@ -1598,6 +1599,7 @@ void migrateCommand(redisClient *c) {
...
@@ -1598,6 +1599,7 @@ void migrateCommand(redisClient *c) {
robj
*
aux
;
robj
*
aux
;
dbDelete
(
c
->
db
,
c
->
argv
[
3
]);
dbDelete
(
c
->
db
,
c
->
argv
[
3
]);
signalModifiedKey
(
c
->
db
,
c
->
argv
[
3
]);
addReply
(
c
,
shared
.
ok
);
addReply
(
c
,
shared
.
ok
);
server
.
dirty
++
;
server
.
dirty
++
;
...
...
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