mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 09:17:20 +00:00
Reorder signalModifiedKey in xaddCommand. (#12895)
This PR is a supplement to #11144, moving `signalModifiedKey` in `xaddCommand` after the trimming, to ensure the state of key eventual consistency. Currently there is no problem with Redis, but it is better to avoid issues in future development on Redis.
This commit is contained in:
parent
2c5b51ad26
commit
9d0158bf89
@ -2052,7 +2052,6 @@ void xaddCommand(client *c) {
|
||||
sds replyid = createStreamIDString(&id);
|
||||
addReplyBulkCBuffer(c, replyid, sdslen(replyid));
|
||||
|
||||
signalModifiedKey(c,c->db,c->argv[1]);
|
||||
notifyKeyspaceEvent(NOTIFY_STREAM,"xadd",c->argv[1],c->db->id);
|
||||
server.dirty++;
|
||||
|
||||
@ -2072,6 +2071,8 @@ void xaddCommand(client *c) {
|
||||
}
|
||||
}
|
||||
|
||||
signalModifiedKey(c,c->db,c->argv[1]);
|
||||
|
||||
/* Let's rewrite the ID argument with the one actually generated for
|
||||
* AOF/replication propagation. */
|
||||
if (!parsed_args.id_given || !parsed_args.seq_given) {
|
||||
|
Loading…
Reference in New Issue
Block a user