[PATCH 2/3] iproto: fix error with input discarding
vdavydov.dev at gmail.com
Mon Apr 23 14:20:16 MSK 2018
On Sat, Apr 21, 2018 at 01:52:10AM +0300, Vladislav Shpilevoy wrote:
> Long-polling request has a feature allowing to discard an input
> buffer in a connection before the main request is finished.
> Before the patch discard just calls iproto_resume() trying to
> notify libev, that is can get new data. But is makes no sense,
> because iproto_resume() continues only connections stopped due
> to reached limit of maximal requests in fly, but not connections
> whose buffer is overflowed. Such stopped connections can be
> continued only after a request is complete.
> To continue read from the connection whose buffer was freed by
> discarding long-poll it is necessary to explicitly feed to it
> EV_READ event. On this event iproto_connection_on_input will read
> a blocked data if it exists.
> src/box/iproto.cc | 5 +-
> test/box/request_limit.result | 114 ++++++++++++++++++++++++++++++++++++++++
> test/box/request_limit.test.lua | 63 ++++++++++++++++++++++
> 3 files changed, 180 insertions(+), 2 deletions(-)
> create mode 100644 test/box/request_limit.result
> create mode 100644 test/box/request_limit.test.lua
More information about the Tarantool-patches