From c7b6b22efa25e31bab88f338073fa648e261833c Mon Sep 17 00:00:00 2001 From: Twice Date: Sat, 26 Oct 2024 20:13:19 +0800 Subject: [PATCH] fix(cmd): add exclusive flag to FLUSHDB/FLUSHALL (#2624) --- src/commands/cmd_server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/cmd_server.cc b/src/commands/cmd_server.cc index 54c22980dd6..3d98a5f56f8 100644 --- a/src/commands/cmd_server.cc +++ b/src/commands/cmd_server.cc @@ -1337,8 +1337,8 @@ REDIS_REGISTER_COMMANDS(Server, MakeCmdAttr("auth", 2, "read-only o MakeCmdAttr("config", -2, "read-only", NO_KEY, GenerateConfigFlag), MakeCmdAttr("namespace", -3, "read-only", NO_KEY), MakeCmdAttr("keys", 2, "read-only slow", NO_KEY), - MakeCmdAttr("flushdb", 1, "write no-dbsize-check", NO_KEY), - MakeCmdAttr("flushall", 1, "write no-dbsize-check", NO_KEY), + MakeCmdAttr("flushdb", 1, "write no-dbsize-check exclusive", NO_KEY), + MakeCmdAttr("flushall", 1, "write no-dbsize-check exclusive", NO_KEY), MakeCmdAttr("dbsize", -1, "read-only", NO_KEY), MakeCmdAttr("slowlog", -2, "read-only", NO_KEY), MakeCmdAttr("perflog", -2, "read-only", NO_KEY),