Skip to content

[NEW] Support monitor command with RESP3 push type #1428

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

Open
KowalczykBartek opened this issue Dec 11, 2024 · 1 comment · May be fixed by #1426
Open

[NEW] Support monitor command with RESP3 push type #1428

KowalczykBartek opened this issue Dec 11, 2024 · 1 comment · May be fixed by #1426

Comments

@KowalczykBartek
Copy link

KowalczykBartek commented Dec 11, 2024

The problem/use-case that the feature addresses

Add support for MONITOR command for the RESP3 push type, so, instead of

+1733939274.692107 [0 127.0.0.1:51014] "get" "a"

the connection after sending hello 3 and monitor will receive

>2
$7
monitor
+1733939225.708882 [0 127.0.0.1:51014] "get" "a"

Description of the feature

Original issue is from here antirez/RESP3#21 - first support for redis was opened here redis/redis#11216 .
Now I am reopening it here :) I am not sure this implementation is correct (I am not C expert), in case of any comments I am happy to apply suggested changes.

PR with port: https://github.com/valkey-io/valkey/pull/1426/files

@KowalczykBartek KowalczykBartek linked a pull request Dec 11, 2024 that will close this issue
@zuiderkwast
Copy link
Contributor

@KowalczykBartek From the discussion in the PR, it seems that this is a breaking change that csn break someexistng clients or tools.

Do you think an extra parameter to enable Push bahviour can be acceptable? Such as MONITOR PUSH.

This issue describes a change but it doesn't really explain what problem and use cases this change solves. I can see two problems:

  1. When resp3 is used, a client should be able trust that every command gets exacly one regular reply (non-push reply), but monitor sends multiple replies. (This is broken by monitor, but also by the subscribe and unsubscribe commands.)
  2. The client wants to use monitor and send other commands on the same connection.

An optional argument to monitor, like MONITOR [PUSH] can solve 2 but not 1. For 1 we need the guarantee that all commands follow the request-reponse model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants