Skip to content

Conversation

@enjoy-binbin
Copy link
Contributor

@enjoy-binbin enjoy-binbin commented Dec 4, 2023

It was first added to load lua from RDB, see 28dfdca. After #9812,
we no longer save lua in RDB. luaCreateFunction will only be called
in script load and eval*, both of which are available in the client.

It could be that that some day we'll still want to load scripts from
somewhere that's not a client. This fix is in dead code.

It was first added to load lua from RDB, see 28dfdca. After redis#9812,
we no longer save lua in RDB. luaCreateFunction will only be called
in script load and eval*, both of which are available in the client.

Remove the dead code and comments to avoid misunderstandings.
@enjoy-binbin enjoy-binbin requested a review from oranagra December 4, 2023 04:00
Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd rather keep it.
it could be that that some day we'll still want to load scripts from somewhere that's not a client.

@enjoy-binbin enjoy-binbin changed the title Remove dead code in luaCreateFunction about the client being NULL Check whether the client is NULL in luaCreateFunction Dec 4, 2023
@enjoy-binbin
Copy link
Contributor Author

ok, fair enough, this fix is in dead code.

@oranagra oranagra merged commit 764838d into redis:unstable Dec 4, 2023
@enjoy-binbin enjoy-binbin deleted the remove_deadcode branch December 5, 2023 01:56
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