-
Notifications
You must be signed in to change notification settings - Fork 693
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
RESP3 PUSH support for MONITOR command #1426
base: unstable
Are you sure you want to change the base?
RESP3 PUSH support for MONITOR command #1426
Conversation
30c1c7e
to
6babded
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Nice!
Clang-format complains about missing space after if
and after comma.
You need to sign off the commits using |
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
df27cc2
to
15b2834
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1426 +/- ##
============================================
- Coverage 70.88% 70.83% -0.06%
============================================
Files 119 119
Lines 64652 64701 +49
============================================
Hits 45831 45831
- Misses 18821 18870 +49
|
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
36adcad
to
182b66e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@valkey-io/core-team Please approve (or not) the changed behaviour of MONITOR described in the top comment.
It's a potentially breaking change (unless we consider it a bugfix?) so we should release it in the next major release, Valkey 9, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: KowalczykBartek <[email protected]>
1c592d1
to
9c68dd6
Compare
Signed-off-by: KowalczykBartek <[email protected]>
Signed-off-by: KowalczykBartek <[email protected]>
It's definitely a breaking change and definitely not a bug fix. Can we implement this not as a breaking change, maybe with an optional argument? I am very much against breaking changes when possible. |
It was meant as a rhetorical question. :) I did add the label.
I am too. Why do I keep forgetting? I guess there are two reasons why I thought this is OK:
|
Reading the opinions and feelings I think its more a bug than a feature :D But that's not a problem for me to push this flag's support (of course if I will be able to implement this :)), please just write me how it should looks like |
This is a good change but it is indeed breaking. Also I am curious about the rationale behind tying this behavior to REPS 3? Can we consider opt'ing in via a new |
RESP2 doesn't have pushes.... It only makes sense for RESP3 and RESP3 is already opt-in. I can see a few ways to proceed:
A CLIENT CAPA just for modifying the behavior of one command seems odd. Then, an optional parameter to MONITOR seems more clean. |
Thanks @zuiderkwast. Yeah, "client capa" is over kill. I like option 3. |
Change MONITOR in RESP3 mode to report monitored commands using the RESP3 push type, instead of as a stream of simple string replies.
This makes it possible for a client to send commands while it's in monitoring mode. It also makes it possible to use MONITOR with clients like hiredis, that handle push replies by delegating them to a push-callback provided by the user.
Old format, a stream of replies on the form
New format, after sending HELLO 3 and MONITOR, the connection will receive push messages on the form
Additional change: If MONITOR is called again when already in monitoring mode, the command replies with an error instead of no reply. A command with no reply confuses clients. They're expecting a reply to each command.
Closes #1428.