Skip to content

Support more script flags in lua script shebang #2414

@PokIsemaine

Description

@PokIsemaine

Search before asking

  • 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: #1884 , #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

#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?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions