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
3a0b78bc
Commit
3a0b78bc
authored
Sep 12, 2017
by
antirez
Browse files
Streams: rewrite XADD ID argument for AOF/slaves.
parent
19b06935
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
3a0b78bc
...
...
@@ -414,6 +414,16 @@ void xaddCommand(client *c) {
signalModifiedKey
(
c
->
db
,
c
->
argv
[
1
]);
notifyKeyspaceEvent
(
NOTIFY_STREAM
,
"xadd"
,
c
->
argv
[
1
],
c
->
db
->
id
);
server
.
dirty
++
;
/* Let's rewrite the ID argument with the one actually generated for
* AOF/replication propagation. */
robj
*
idarg
=
createObject
(
OBJ_STRING
,
sdscatfmt
(
sdsempty
(),
"%U.%U"
,
id
.
ms
,
id
.
seq
));
rewriteClientCommandArgument
(
c
,
i
,
idarg
);
decrRefCount
(
idarg
);
/* We need to signal to blocked clients that there is new data on this
* stream. */
if
(
server
.
blocked_clients_by_type
[
BLOCKED_STREAM
])
signalKeyAsReady
(
c
->
db
,
c
->
argv
[
1
]);
}
...
...
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