summaryrefslogtreecommitdiff
path: root/src/module.c
diff options
context:
space:
mode:
authorMeir Shpilraien (Spielrein) <meir@redis.com>2022-10-09 07:42:21 +0300
committerGitHub <noreply@github.com>2022-10-09 07:42:21 +0300
commitd2ad01ab3e24ca537efdd1fc6ff1ae2c657f4a51 (patch)
treeb59d73741902f16eed0b084fcc67421ff5119c0e /src/module.c
parentf609a4eda79c693cd92fa0c1be4ac1481f9b8910 (diff)
downloadredis-d2ad01ab3e24ca537efdd1fc6ff1ae2c657f4a51.tar.gz
`RedisModule_ResetDataset` should not clear the functions. (#11268)
As mentioned on docs, `RM_ResetDataset` Performs similar operation to FLUSHALL. As FLUSHALL do not clean the function, `RM_ResetDataset` should not clean the functions as well.
Diffstat (limited to 'src/module.c')
-rw-r--r--src/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c
index 28d2cad55..19e60400f 100644
--- a/src/module.c
+++ b/src/module.c
@@ -3899,7 +3899,7 @@ int RM_SetAbsExpire(RedisModuleKey *key, mstime_t expire) {
* When async is set to true, db contents will be freed by a background thread. */
void RM_ResetDataset(int restart_aof, int async) {
if (restart_aof && server.aof_state != AOF_OFF) stopAppendOnly();
- flushAllDataAndResetRDB(async? EMPTYDB_ASYNC: EMPTYDB_NO_FLAGS);
+ flushAllDataAndResetRDB((async? EMPTYDB_ASYNC: EMPTYDB_NO_FLAGS) | EMPTYDB_NOFUNCTIONS);
if (server.aof_enabled && restart_aof) restartAOFAfterSYNC();
}