MXS-2259: Limit size of client reads

Given the assumption that queries are rarely 16MB long and that
realistically the only time that happens is during a large dump of data,
we can limit the size of a single read to at most one MariaDB/MySQL packet
at a time. This change allows the network throttling to engage a lot
sooner and reduces the maximum overshoot of throtting to 16MB.
This commit is contained in:
Markus Mäkelä
2019-04-05 11:04:04 +03:00
parent aad29404c6
commit 05515cca16
3 changed files with 14 additions and 3 deletions

View File

@ -265,6 +265,7 @@ DCB* dcb_accept(DCB* listener);
DCB* dcb_alloc(dcb_role_t, struct servlistener*);
DCB* dcb_connect(struct server*, struct session*, const char*);
int dcb_read(DCB*, GWBUF**, int);
int dcb_bytes_readable(DCB* dcb);
int dcb_drain_writeq(DCB*);
void dcb_close(DCB*);