xiaobiaozhao commented on code in PR #782:
URL: https://github.com/apache/incubator-kvrocks/pull/782#discussion_r956556446


##########
src/scripting.cc:
##########
@@ -233,11 +240,18 @@ namespace Lua {
   Status evalGenericCommand(Redis::Connection *conn,
                             const std::vector<std::string> &args,
                             bool evalsha,
-                            std::string *output) {
+                            std::string *output,
+                            bool read_only) {
     int64_t numkeys = 0;
     char funcname[43];
     Server *srv = conn->GetServer();
-    lua_State *lua = srv->Lua();
+    lua_State *lua = NULL;
+    if (read_only) {
+      // use worker's lua VM
+      lua = conn->Owner()->Lua();
+    } else {
+      lua = srv->Lua();
+    }

Review Comment:
   done



-- 
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]

Reply via email to