Skip to content

Conversation

@max-frank
Copy link
Contributor

WHAT

Add support for marking redis commands as ReadOnly and marked 70 commands as read only.

The readonly command list is based on the JSON data in

A command was deemed as readonly if the field contained

WHY

This is a first step for implementing support for EVAL_RO, EVALSHA_RO (#414) as the read only marker can be used for constructing a restricted execution environment. Other than eval/function commands this flag could also be useful for adding support for a readonly replica operation mode. Such a mode could be useful in complex test scenarios were a user might want to ensure that write commands are not sent to a replica.

This new marker can be used to create restricted execution environments
e.g., EVAL_RO, FUNCTION_RO

Signed-off-by: Maximilian Frank <1375575+max-frank@users.noreply.github.com>
The readonly command list is based on the JSON data in
https://github.com/redis/redis/tree/acbcaae530035aab5480756e8e29e075398ea931/src/commands
A command was deemed as readonly if the  field contained

Signed-off-by: Maximilian Frank <1375575+max-frank@users.noreply.github.com>
@alicebob alicebob merged commit ed06249 into alicebob:master Sep 24, 2025
4 checks passed
@alicebob
Copy link
Owner

Thanks! I made some minor changes. Looking forward to the follow up :)

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