[PATCH v2 1/4] iproto: fix error with input discarding

Vladimir Davydov vdavydov.dev at gmail.com
Tue Apr 24 18:35:59 MSK 2018


On Mon, Apr 23, 2018 at 08:05:01PM +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   | 122 ++++++++++++++++++++++++++++++++++++++++
>  test/box/request_limit.test.lua |  70 +++++++++++++++++++++++
>  3 files changed, 195 insertions(+), 2 deletions(-)
>  create mode 100644 test/box/request_limit.result
>  create mode 100644 test/box/request_limit.test.lua

Ack



More information about the Tarantool-patches mailing list