summaryrefslogtreecommitdiff
path: root/proxy.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-05-31 23:27:22 -0700
committerdormando <dormando@rydia.net>2022-07-24 23:02:50 -0700
commitd273bd2063ac3e3171e8c74d0a8557102429a3f2 (patch)
treee3e859c84b071779ab99c3c817d77331caa77b9a /proxy.h
parent581e41623074cc989c11de03099994fe74db164a (diff)
downloadmemcached-d273bd2063ac3e3171e8c74d0a8557102429a3f2.tar.gz
proxy: rework backend buffer handling
experimental change. *io_uring mode is presently broken* there are some potential protocol desync bugs due to mcmc handling its own buffers and the newer event handler handling its own syscalls. this change should have better separation of code for the buffer tracking. if this change works I will add some optimizations to reduce memmove's.
Diffstat (limited to 'proxy.h')
-rw-r--r--proxy.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy.h b/proxy.h
index 1c44ef3..4d88867 100644
--- a/proxy.h
+++ b/proxy.h
@@ -310,7 +310,8 @@ struct mcp_backend_s {
void *client; // mcmc client
STAILQ_ENTRY(mcp_backend_s) be_next; // stack for backends
io_head_t io_head; // stack of requests.
- char *rbuf; // static allocated read buffer.
+ char *rbuf; // statically allocated read buffer.
+ size_t rbufused; // currently active bytes in the buffer
struct event event; // libevent
#ifdef HAVE_LIBURING
proxy_event_t ur_rd_ev; // liburing.