-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Add FUNCTION FLUSH command to flush all functions #9936
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
Conversation
The new FUNCTION sub-command allows delete all the functions. An optional [SYNC|ASYNC] argument can be given to control whether or not to flush the function synchronously or asynchronously. if not given the default flush mode is chosen by lazyfree-lazy-user-flush configuration values.
|
@redis/core-team please approve another small step in the functions project. |
zuiderkwast
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Didn't review the tests.
Co-authored-by: Viktor Söderqvist <viktor@zuiderkwast.se>
madolson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the API, and a minor wording note.
itamarhaber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API lgtm
Use `server.dirty++` instead of `forceCommandPropagation` to make sure the command will be counted as changing the data (for persistence configuration).
Use `addReplySubcommandSyntaxError` on `FUNCTION FLUSH`
unit/functions was missing from test_helper.tcl which caused functions tests not to run when not directly specify. Also, added `function flush` to server.tcl to make sure functions will be cleaned between tests on external server.
Co-authored-by: sundb <sundbcn@gmail.com>
Added `FUNCTION FLUSH` command. The new sub-command allows delete all the functions. An optional `[SYNC|ASYNC]` argument can be given to control whether or not to flush the functions synchronously or asynchronously. if not given the default flush mode is chosen by `lazyfree-lazy-user-flush` configuration values. Add the missing `functions.tcl` test to the list of tests that are executed in test_helper.tcl, and call FUNCTION FLUSH in between servers in external mode
Base on conversion on #9923, added
FUNCTION FLUSHcommand. The new sub-command allows delete all the functions. An optional[SYNC|ASYNC]argument can be given to control whether or not to flush the functions synchronously or asynchronously. if not given the default flush mode is chosen bylazyfree-lazy-user-flushconfiguration values.Add the missing
functions.tcltest to the list of tests that are executed in test_helper.tcl, and call FUNCTION FLUSH in between servers in external mode