spacewander commented on code in PR #7041:
URL: https://github.com/apache/apisix/pull/7041#discussion_r873159030
##########
apisix/stream/xrpc/protocols/redis/init.lua:
##########
@@ -31,6 +31,15 @@ local ipairs = ipairs
local tonumber = tonumber
+core.ctx.register_var("redis_cmd_line", function(ctx)
+ local curr_ctx = ctx.xrpc_session and ctx.xrpc_session._curr_ctx
+ if not curr_ctx then
+ core.log.warn("can't find current context")
+ return nil
+ end
+ return curr_ctx.cmd
Review Comment:
We should return cmd_line instead?
https://github.com/apache/apisix/blob/1cdcc5caffc7ccf3825e3be43f62af8388b93551/apisix/stream/xrpc/protocols/redis/init.lua#L216
We can join the array with ` ` as this var is used in the log.
--
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]