summaryrefslogtreecommitdiff
path: root/proxy_lua.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2023-02-01 14:35:22 -0800
committerdormando <dormando@rydia.net>2023-02-01 14:35:22 -0800
commitf06dc8ca278b218414340680baf34fdccbf52b6f (patch)
treeb0a9c404dbf7b94c9839de73b9064f180b11a306 /proxy_lua.c
parent58d8f40a90ee22d78adc0ae99f4b915e65f69be6 (diff)
downloadmemcached-f06dc8ca278b218414340680baf34fdccbf52b6f.tar.gz
proxy: disallow overriding mn command
When using CMD_ANY_STORAGE to enable the proxy this causes the MN command to no longer work as intended; the proxy eats the command and does not flush the client response pipeline.
Diffstat (limited to 'proxy_lua.c')
-rw-r--r--proxy_lua.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/proxy_lua.c b/proxy_lua.c
index f309515..2d38b8e 100644
--- a/proxy_lua.c
+++ b/proxy_lua.c
@@ -826,6 +826,11 @@ static int mcplib_attach(lua_State *L) {
for (int x = loop_start; x < loop_end; x++) {
struct proxy_hook *h = &hooks[x];
+ if (x == CMD_MN) {
+ // disallow overriding MN so client pipeline flushes work.
+ // need to add flush support before allowing override
+ continue;
+ }
lua_pushvalue(L, 2); // duplicate the function for the ref.
if (tag) {