PragmaTwice commented on code in PR #3155:
URL: https://github.com/apache/kvrocks/pull/3155#discussion_r2315884062
##########
src/commands/cmd_function.cc:
##########
@@ -120,10 +120,17 @@ uint64_t GenerateFunctionFlags(uint64_t flags, const
std::vector<std::string> &a
return flags;
}
-REDIS_REGISTER_COMMANDS(Function,
- MakeCmdAttr<CommandFunction>("function", -2,
"exclusive no-script", NO_KEY,
- GenerateFunctionFlags),
- MakeCmdAttr<CommandFCall<>>("fcall", -3, "write
no-script", GetScriptEvalKeyRange),
- MakeCmdAttr<CommandFCall<true>>("fcall_ro", -3,
"read-only no-script", GetScriptEvalKeyRange));
+uint64_t GenerateFCallFlags(uint64_t flags, const std::vector<std::string> &,
const Config &config) {
+ if (!config.lua_strict_key_accessing) {
+ return flags | kCmdExclusive;
+ }
+
+ return flags;
+}
+
+REDIS_REGISTER_COMMANDS(
+ Function, MakeCmdAttr<CommandFunction>("function", -2, "exclusive
no-script", NO_KEY, GenerateFunctionFlags),
Review Comment:
FUNCTION command is not affected by this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]