Skip to content

Pass RESP3 to modules and custom commands#1208

Merged
TalZaccai merged 7 commits intomicrosoft:mainfrom
prvyk:resp3modules
May 23, 2025
Merged

Pass RESP3 to modules and custom commands#1208
TalZaccai merged 7 commits intomicrosoft:mainfrom
prvyk:resp3modules

Conversation

@prvyk
Copy link
Copy Markdown
Contributor

@prvyk prvyk commented May 20, 2025

This PR changes command and module signatures so that we pass RespMemoryWriter to them instead of the ref tuple. This allows adjusting output to RESP3.

I considered the alternative of just passing an additional respProtocolVersion in the signature, and I think this is slightly nicer. We can erase some custom output code, authors get more output functions, and reallocation is handled for them. If they want the previous allocation behaviour (measure and then Rent exactly from the pool), they can get it by calling RespMemoryWriter.Realloc() themselves first.

…e> directly. This lets these functions be aware of current protocol and provides a wide range of output functions.
Comment thread libs/server/Custom/CustomRawStringFunctions.cs
@badrishc badrishc requested review from TalZaccai and TedHartMS May 20, 2025 18:12
Comment thread libs/server/Storage/Functions/ObjectStore/RMWMethods.cs
@badrishc badrishc removed the request for review from TedHartMS May 20, 2025 23:46
@TalZaccai TalZaccai requested a review from TedHartMS May 22, 2025 18:07
@TalZaccai TalZaccai merged commit 1db1f9e into microsoft:main May 23, 2025
26 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants