Skip to content

RespServerSession RESP3 update #1223

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
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

prvyk
Copy link
Contributor

@prvyk prvyk commented May 25, 2025

This PR has two main goals:

  1. Further update RESP3 support.
  2. Save on boilerplate in RespServerSession output.

The former is done by fixing various cases for RESP3 null/double and adding verbatim string support. The latter is done by adding output functions to RespServerSession (in a separate file), but the PR holds off on use till performance implications are fully checked. Also some misc. RESP2 updates (redis-cli expects an extra newlines in CLIENT INFO/LIST, these commands should emit Bulk, not simple strings).

@prvyk prvyk force-pushed the resp3serversession branch 3 times, most recently from 2159e54 to 2b77659 Compare May 25, 2025 17:04
@badrishc
Copy link
Collaborator

This is a lot of refactoring and depending on .NET's force inlining capability. We need to make sure there are no performance regressions due to e.g. saturating the inline limits that .NET places internally.

Also, see the BDN results here and identify any regressions: ee395dc#comments

There seems to be general degradations all over the place.

@badrishc
Copy link
Collaborator

Would it be possible to break this PR up into two parts: (1) the force-inlined-method version of while() ... SendAndReset(); and (2) all the other improvements/bugfixes that have no perf impact. The latter is easier to merge, whereas the former still needs better understanding of perf implications.

@prvyk
Copy link
Contributor Author

prvyk commented May 30, 2025

Yes, I was already working on that, will update the PR a bit later.

prvyk added 11 commits May 30, 2025 23:14
In some sorted set commands, Garnet should emit double in RESP3.
Emit RESP3 "txt" where appropriate.
CLIENT INFO should emit Bulkstring in RESP2, not simple.
Use this to add final newline to make output easier to read.
… functions to previous RespServerSession.cs file.
ACL WHOAMI should return bulk, not simple string.
Latency help doesn't accept subarguments.
@prvyk prvyk force-pushed the resp3serversession branch from a293585 to c4dbd56 Compare May 30, 2025 20:16
prvyk added 3 commits May 30, 2025 23:58
…ng ASCII, so UTF8 output is pointless.

A few more AbortWith.. replacements where there are no performance implications for the main path and the resulting code is clearer.
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 this pull request may close these issues.

2 participants