New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] RPOPLPUSH, LMOVE keyspace events produced in wrong order #11412
Comments
|
thanks for the report. for the record: 6.2.0: unstable (7.0.x): unstable (after the fix-commit, swap the positions of |
|
i run a quick test to see if it was recently broken or not (tested BRPOPLPUSH being blocked). i then wen't to the documentation blame log to see if maybe it was a careless change in the docs, but that statement appears to be there since the day the keyspace notification doc was added. [edit] also tested the non-blocking path, in 3.2 and 6.0, the pop notification was last. |
|
so looks like just fixing the doc is a safe bet, (and maybe adds some explicit comments / tests to persist this) |
Describe the bug
RPOPLPUSH, LMOVE keyspace events are produced in incorrect order. The Redis documentation states: "the lpush event will always be delivered after the rpop event" but at least since Redis 6.2.1 they have been delivered in the opposite order - that is, the push event is delivered first, and then the pop event is delivered. The same behavior is observed in Redis 7.x.
To reproduce
config set notify-keyspace-events KEA).redis-cli --csv psubscribe '__key*__:*').lpush key a b c d)lmove key koy left right)In the redis-cli monitoring keyspace events, the events will be displayed in the wrong order:
"pmessage","__key*__:*","__keyspace@0__:koy","rpush" "pmessage","__key*__:*","__keyevent@0__:rpush","koy" "pmessage","__key*__:*","__keyspace@0__:key","lpop" "pmessage","__key*__:*","__keyevent@0__:lpop","key"Expected behavior
The events should be delivered in the order described in the documentation.
Additional information
It appears that the keyspace call that handles the pop event (with the comment
/* Delete the source list when it is empty */) in t_list.c should be moved up, before the call tolmoveHandlePush().The text was updated successfully, but these errors were encountered: