kvrocks
kvrocks copied to clipboard
Support more script flags in lua script shebang
Search before asking
- [X] I had searched in the issues and found no similar issues.
Motivation
https://redis.io/docs/latest/develop/interact/programmability/lua-api/#script_flags https://redis.io/docs/latest/develop/interact/programmability/eval-intro/#eval-flags https://redis.io/docs/latest/develop/interact/programmability/functions-intro/#function-flags
It seems that only the name
flag of redis function is supported now, and we can support the parsing of some other flags. For example no-writes
, allow-cross-slot-keys
, etc.
On the one hand, there are already existing requirements issue: https://github.com/apache/kvrocks/issues/1884 , https://github.com/apache/kvrocks/issues/2133
On the other hand, for the optimization function of Lua script in the future, we may need to support some special flags like dragonflydb to enable optimization. Relevant information:
https://www.dragonflydb.io/docs/managing-dragonfly/scripting
https://www.dragonflydb.io/blog/leveraging-power-of-lua-scripting
https://github.com/apache/kvrocks/issues/2162
Solution
I'm thinking about how to implement it. Generally speaking, the process of parsing and obtaining flag should be more general.
Are you willing to submit a PR?
- [X] I'm willing to submit a PR!