Skip to content
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

scripting feature request: support redis calls with a table holding arguments #6651

Open
ethanresnick opened this issue Dec 7, 2019 · 0 comments

Comments

@ethanresnick
Copy link

Redis commands can take many more arguments than can actually be passed to redis.call in a lua script, because of lua's limit on the stack size when calling a function. This necessitates ugly workarounds, like the massive_redis_command helper function proposed in another issue, which presumably also have a performance cost.

The underlying cause for this issue seems to usually be trying to pipe the (possibly transformed) output of one redis command as the input to another, which scripting was meant to solve, but which is a bit annoying to do reliably if you have to worry about these stack size issues.

To avoid these hacks, it would be nice for redis to expose to lua a function that could take a lua table as the command's arguments. I don't have strong feelings about the name/exact API, but perahps something like redis.callWithTable(cmd_name, table_of_args)?

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

No branches or pull requests

1 participant